Curly Bracket Delimeters.


Posted on 16th Feb 2014 07:03 pm by admin

I'd always believed that the starting and ending delimeters in preg_ functions had to be the same character, but recently discovered that you can use the curly brackets.

Example:
Code: [Select]if(preg_match('{[0-9]}', $input)) {
Did you know?Explore Trending and Topic pages for more stories like this.
I was just wondering if there was any disadvantage/advantage of using this method?
No comments posted yet

Your Answer:

Login to answer
195 Like 29 Dislike
Previous forums Next forums
Other forums

Escape Latin Characters
I need to escape latin characters in an xml doc. Example: "é" is escaped to "é". I thoug

Search function
I am looking for some guidance from the experts.

I am trying to create a search function. It

Rand() help needed
Hi all,

Can someone explain and give me a quick example of how I would go about this?

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

SQL query not working well
Hi,
I made a small table with 5 rows and want to make them an sql consult using rownum

. and .. appearing instead of pictures
First of all, thanks very much for providing this forum. It is very much appreciated!

My son

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the

How to secure my login data to my database?
Hi there,

It may be a stupid question but I don't know how to secure my login data to my data

Need PHP help... have all the elements... just need help putting them together :
Hey Guys,

I was wondering if someone could help me. I am doing a website for a client which

How to display objects in a row
I have 7 codes that i want to display in a row one next to another.
The first is {$ads->ad

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash