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

include function being weird?
I have a very simple system to grab an IP outputted by a PHP file.. (for a project I have) but it ou

Parse String
I need to parse the string below into three variables. How would I do that?

john + 10/20/2008

Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as

Better Method of a Member Cloud
I assume most people know how tag clouds work, where the tags most used are bigger and the least use

Linkage between two scripts
Okay say I have this for a link in a script:

Code: <li><a href="#&q

Help with usergroups? prolly really quick
So were coding our own forums for a game system we made an we have the users level setup but now I n

pageination not working right... coping images over 4 pages
Code: <?php //This code will obtain the required page number from the $_GET array. Note that

CODE NOT WORKING
Code: [Select]<?php
//include shared codes

include '../lib/common.php';
include

Reg Ex
Im trying to search for the string: srv_9 (Dead ???)

I thought to use preg_match, however I d

Email to a friend script problems
I have this send-to-a-friend script with 2 issues:


1) When you open the form popup on a 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