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

DOMDocument parsing
Hello, I am parsing an xml file from an API which I have converted into a DOMDocument in php. This i

ORA-00932: inconsistent datatypes: expected - got CLOB
SO : windows xp
database : XE

there is a table (transito) with two fields of clob

Undefined offset
The following script checks to see if the user answer matches the correct answer.

Form Fiel

Ten Operator Syntax
Hi Guys,

I can't figure out why i am getting a parse error with this basic ten op code:

Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,

I have a script with some options.

I use regex to replace patterns in strings, but

string to currency format
Hi guys...

Actually I chunk out some data from txtfile and one of the data contains amount va

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

Why does this file not return file names that start with numbers?
This file returns a list of filenames to help populate a drop down in my form. For some reason it ig

printing links
Hi every1

i am connecting to a table in sql and the looping through with a while ($ var = my

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

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