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)) {
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

losing variables between php brackets
Hi

have got this code:
Code: $id=mysql_result($result,0,"itemid");
$title=mys

HTML Viewer HIDE scrollbar
How can I disable scrollbars in a HTML Viewer control? I can't hide them. Even i have enough space b

Simple code help with redirects
I am trying to figure out a redirect script that detects if the browser is IE 7 and if it does, redi

validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners

mysql_affected_rows() usage
Possibly a MySQL issue, but the function that is not behaving in the anticipated way is a PHP functi

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

square instead of number
Hello
I do not know why but this code seems to work fine only in my xampp local insallation but n

Random Number Generation And Probability
Hello, I am working on a function which has to insert data into a SQL table.

we have to suppl

need Array help
This is what I have to do.
$teamname[1] = "Red Sox"
$teamname[2] = "Gian

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

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