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

Cant display mysql data
Hey all,

I am learning php and my first goal is to create a simple CMS. At the moment I am st

Collecting AOL Search Terms
I am attempting to collect AOL search terms. I know the code is correct (it works for google, bing,

extract a file from zip file
hi,
i know how to unzip a zip file in php, but is there a way to just extract a certain file only

Can't seem to capture a variable in a chained select
I'm *this* close to having a chained select running but for some reason it doesn't seem to be pickin

Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with

Ajax Error since Upgrading to 3.5
Ever since upgrading my site to .NET 3.5 (I needed LINQ), I've been getting this annoying error on o

Rounding a number queried from a database
I know that to display a rounded number you just do echo "round($number)";. But how would

count only commas outside parenteses
I have a sql table containing
id - query - query name
the first page contains a drop down men

Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get

media recovery
Hi,
i startup the database i got the error

SQL> startup
ORACLE instance started.

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