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

dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha

Pagination
Hi All,

I think I'm finally getting somewhere with pagination!

I can now submit a quer

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

Mail sending is slow on server
Why mail is taking time to be send on apache-linux server

Web Application Recipe
Hi Guys!

I am working with the Web Application recipes. I am currently working on the sen

user administration
Dear @all,

what I have to do to set the user defaults for new users. At the moment I woul

compile php5 with DOM
Hi,

I can't manage to compile php 5.3.0 from source on Windows to include DOM,
in spite of

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

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