Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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

Posts: 95
Name: Indrit
Trades: 0
If you want to control a link while submitted from a form, how would this functions be used properly?
__________________

Please login or register to view this content. Registration is FREE
scutari is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-24-2008, 10:28 AM Re: How to use preg_match?
Skilled Talker

Posts: 71
Trades: 0
...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, 11:41 AM Re: How to use preg_match?
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
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.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 06-24-2008, 06:04 PM Re: How to use preg_match?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
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

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to How to use preg_match?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.13106 seconds with 12 queries