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

Call db table from any PHP file
Hi,

I want to be able to call a database table that will be setup in another file called init

The control with ID 'ace' requires a ScriptManager on the page
I'm trying to add a simple AlwaysVisibleControlExtender to my page, but it's not working. I get the

Issues: PHP Forms -Clearing
I've tried looking online before actually asking for help, but I've been looking for about the past

Parse XML
Good day,

I use oempro software and try to parse XMLReturn but it's not working for me, simpl

array_map() probably obvious mistake
The code below is part of a class to escape strings, but should also accept an array, using array_ma

Filtering an Array Based on Value
I have a very simple script set up that pulls data from a database and is output using this code:

form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how

Using loop to count number of entries
I'm writing a program that must ask user to type in numbers. After each entry, the program has to re

EXplanation help
Hey all,

I am still fairly new to PHP programming and I am trying to put together a page wher

BB_Code error
I'm having a problem with a custom built function and keep getting this error:


Warning: M

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