Reply
How to use preg_match?
Old 06-24-2008, 08:44 AM How to use preg_match?
scutari's Avatar
Skilled Talker

Posts: 90
Name: Indrit
If you want to control a link while submitted from a form, how would this functions be used properly?
__________________
Publishers
scutari is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 06-24-2008, 09:28 AM Re: How to use preg_match?
Skilled Talker

Posts: 60
...What?

preg_match() is a Perl-compatible regex function. It is like ereg(), only the regex is different.

preg_match() basically compares a string against a regular expression pattern. The pattern you write depends on what you want it to do. From the extremely vague description of your post, I can't help you further, except to tell you to look up tutorials on regex (regular expressions).
CrazeDizzleD is offline
Reply With Quote
View Public Profile
 
Old 06-24-2008, 10:41 AM Re: How to use preg_match?
wayfarer07's Avatar
$frontend->developer

Posts: 770
Name: Abel Mohler
Location: Asheville, North Carolina USA
I found this video helpful when starting to learn regular expressions. http://www.phpvideotutorials.com/regex/ He uses preg_match for most of his examples, and only covers Perl-compatible regular expressions.
__________________
wayfarer07 is offline
Reply With Quote
View Public Profile
 
Old 06-24-2008, 05:04 PM Re: How to use preg_match?
JeremyMiller's Avatar
Full-Time TeraTasker

Posts: 950
Name: Jeremy Miller
Location: Reno, NV
According to PHP,
Quote:
Originally Posted by http://us3.php.net/ereg
Note: preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg().
This is why I stick with the preg functions.
__________________
Jeremy Miller - TeraTask Technologies, LLC
Content Farmer - Automated Posting for Content & Blog Sites
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to How to use preg_match?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13490 seconds with 13 queries