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

Search with relational database
Hey,

I have quite a complicated (for me anyway ) relational database for an apartments syste

Putting double spaces instead of single spaces
Im looking at trying to replace all single spacing between fields with double spacing

At pres

How to load mysql (and other) extensions into PHP
How to load mysql (and other) extensions into PHP PHP Development forum discussing coding practices,

need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working ca

Form File Upload
I've read through tons of resources and tutorials and as far as I can tell, my code is accurate, but

array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h

Getting a variable to work in function params
I have this fuction which is inside a class:

Code: public static function generateEmbedCode($

Help with looping
I have a comma separated list of colors taken from a database ($ICo) and a directory of images named

Upload Code Help
Hi everyone I need some help with a bit of code ive been working with for a while. I am completely s

replacements
I have a variable in my PHP script like

ASSFDDDDDDDDDDDDDASDDDDDDDDARYTRHKKHHHHHHHHHHH and p

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