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

Renaming a file that a user uploads to site?
My site allows for registered users to upload images to the site under their own gallery. Currently

Loop Through Date Range
Hi guys,
I have date range as parameter like 01/JAN/2009 TO 16/JAN/2009 now i want to loop thro

Menu restriction
How can I restrict the individual menu that would appear when a user logs in so that all users are c

PHP - MySQL Fail
My PHP code will only execute the first part of my code...

Code: <?php

sessio

foreach help.
Hello all,

First time I'm attempting to use a foreach statement and was just wondering if my

sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is somet

how to get IP address?
hey guys,

i have this code which is supposed to get me the IP address of my site visitors:

Need help to identify this error please
:confused:Can anyone help me tell what this error message means? Maybe tell me where to look to fix

gmdate() - want 1 hr before time
Hi,
I am using php gmdate().
Now I am entering all dates in my dbase using gmdate("Y-m-d

Calling All PHPFREAKS Blackberry Users
Are you a member of PHPFreaks and have a blackberry? Well RIM just recently released Blackberry Mes

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