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

iterating through an array and escape each value independently.
I have a set up where the variable being escaped is an array and it needs to be iterated and escaped

TimeZoneOffset
Hello,

Please i need your help. I have a system that users can use to punch in and out. This

Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t

Displaying Multidimensional Arrays...about to put my head in a vice, PLEASE HELP
I am fairly new to PHP and MySQL and I have a problem which I have been trying to resolve for days.

SESSION CHECK WORKS "MOST" of the time... whats going on?
i have a sign in check thats included in every page that is a members only page which is basically a

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

CRM?
I think that's what they're called. Customer Management System? Anyway. Is there any good free ones

Install page
How do I make it so when a user submits information on the Install page, it'll right it into the cor

Help: calling function
Hi,
Is it possible to call a php function on page close?
If yes, could you explain how and whe

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

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