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

Ajax not working on IE 6 for Windows CE
I've created a webpage which uses the classis Ajax in following format:view plaincopy to clipboardpr

login to other site by sending post variables
hey,

here is my problem: my school gave me a mail account for school-stuff use. they mail us

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 se

Setting a default timezone?
I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY the

how to hide input fields on selection screen using variant attribute
Hello all,

I want to know how to hide input fields on selection screen using variant attr

Retreiving objects from Sessions
Hi all,

I am getting really frustrated with storing and retreiving objects from a session. Bu

Problem with php's rename function
So, i'm having a problem with the php rename function. Basically my script 'delete_user.php' attempt

Question handling xml data
Hello,

I have sucessfull followed this tutorial
http://www.phpfreaks.com/tutorial/handlin

question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or

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