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

Find only certain URLs from page ... regex (semi-complete script)
Hi guys,

What I need to do is take a page & extract all the URLs from the page &a

Losing 'page' data
I have this code that allows me to update my database. But after updating, I lose the $_GET['page']

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 ?

How can use this array as a key?
Say I have this array for example:


print_r($array);

Prints:
Code: [Select]Array

OOP help
okay so i have a class im making it has everything setup i just need to randomize the 2 variables an

a dificult string search
Hi I don't know a way around this. I want the user to input a password, but to make it a bit complca

Need help in log in and log out?
hi there all of u. i have recently created a site for someone. i have placed log in and log out and

function to return url
Hi,

Can you guys help me giving a function that takes all the contents in a particular field

Doubles are giving me problems
Ok so, first of all i made a double = 0.05, but when running the debugger it shows up as 0.04999. I

this code is strange !
Hi i got this code from the web.. It checks for live and dead socks
It is working perfectly on my

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