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)) {
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

MySQL query problem
When I try to run the following piece of code, I get this error:
QuoteWarning: mysql_query(): sup

restricting another login once you logout
Hello,

how can I restrict a page from login authenticating against info in a MySQL DB for a s

How can I Compare two xml documents?
Hi all,

I am doing a POC for my project and I am using XE database 10g version.

how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt ?
how to put the 0-100 numbers into 1.txt and 100-200 into 2.txt and so on 200-300 into file 3.txt ?

Combining Two Queries
I have two scripts that each work fine by themselves. One is a search script with a variable that de

Will this protect from mysql injection?
I do not want anything like DROP TABLE to work or any type of coding..

Heres my code.. is it

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

Form Fiel

php mysql query from input textbox
Hi,

I have a text box, in that i have given the mysql query. I can able to get the query in v

Limiting uploaded file type
Hi. First post here
I am working on a simple upload script, and I need it to limit the allowed f

making web pages for accounts
Hello, I would like to make pages for accounts on my website im making (its not a real website..im j

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