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

mysqli_fetch_assoc returns multiple arrays, how to return a single array
Hello, I am using mysqli_fetch_assoc which is returning multiple rows, so it looks like:

Code

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

PHP Multiples of 2, Show posts...not working (wordpress)
I have been using this code to show div.example with 6 li columns inside it, each li is a post with

disabling a button server-side then re-enabling client-side breaks button postback
I have a tabbed container and a button (not in the container) on a page. If the first tab is selecte

pagination - need help on passing of search query.
Hi, i have been trying for days but couldn't get this sorted out. Would like some professional help

"From field" in PHP email form
I used a wizard to create a PHP email form. I was able to customize it with the exception of the Fr

pageination not working right... coping images over 4 pages
Code: <?php //This code will obtain the required page number from the $_GET array. Note that

Problem with "dynamic" index page
Hi. I have one question. In my index.php page I have this kind of code:
Code: // listaa sivut

Trouble verifying database password
Thankyou to everyone who responded to my last post (I can't find the posting, it has been buried). <

Exporting new records
Trying to figure out the best way to set this up.

People register my site.

Their prof

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