PHP Classes

preg_match

Recommend this page to a friend!

      Easy PHP Validation  >  All threads  >  preg_match  >  (Un) Subscribe thread alerts  
Subject:preg_match
Summary:correct your reg.exps
Messages:5
Author:Vitaliy Bogdanets
Date:2007-02-26 12:39:09
Update:2008-06-25 16:38:34
 

  1. preg_match   Reply   Report abuse  
Picture of Vitaliy Bogdanets Vitaliy Bogdanets - 2007-02-26 12:39:10
ip:"/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i"
url:"/^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?$/i"
SA:/^[A-Z][A-Z]$/i

  2. Re: preg_match   Reply   Report abuse  
Picture of Jeff Williams Jeff Williams - 2007-02-27 12:55:18 - In reply to message 1 from Vitaliy Bogdanets
Thanks for the input. I'll see if I can't make some changes today.

  3. Re: preg_match   Reply   Report abuse  
Picture of B. Aguirre C. B. Aguirre C. - 2007-02-27 16:17:37 - In reply to message 1 from Vitaliy Bogdanets
at problem simil?
mentorprovida.com/php/valit/example ...

to see:

match
POST/GET:
Session:
Cookie:
a value exists
alpha
alpha-numeric
date
email

Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /home/mentorp1/public_html/www/php/valit/validation.class.php on line 277
not URL

Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /home/mentorp1/public_html/www/php/valit/validation.class.php on line 294
not IP address
number

Warning: preg_match(): Unknown modifier '[' in /home/mentorp1/public_html/www/php/valit/validation.class.php on line 261
not state code
unsigned number
good length

THANKS

  4. Re: preg_match   Reply   Report abuse  
Picture of Jeff Williams Jeff Williams - 2007-03-01 02:40:45 - In reply to message 1 from Vitaliy Bogdanets
Thank you! I fixed the regular expressions and updated the help.

  5. Re: preg_match   Reply   Report abuse  
Picture of Abdulkadir KUCUK Abdulkadir KUCUK - 2008-06-25 16:38:34 - In reply to message 1 from Vitaliy Bogdanets
My problem is this:

$data = "
var additionalStatsHonorsUrl = '/watch_ajax?v=vEpjIBUg2bc&action_get_honors=1&l=EN';
var watchMapUrl = '/watch_ajax?v=vEpjIBUg2bc&action_get_map=1';
var fullscreenUrl = '/watch_fullscreen?fs=1&vq=None&sourceid=y&video_id=vEpjIBUg2bc&l=245&sk=Ft6jDSmAMFaODkwwIRtVwCA-T8y6C1v8U&fmt_map=&t=OEgsToPDskKDdIUlCMymfkkKmpZCu6-S&hl=en&plid=AARQfzF3HtNJnTUVAAAAoAQsYAQ&sdetail=f%253Arec-fresh%252Cp%253A%2F&title=ASLI GÜNGÖR & FERHAT GÖÇER';
var watchGamUrl = null;
var watchDCUrl = null;";
// From this data how can I get video_id=vEpjIBUg2bc&t=OEgsToPDskKDdIUlCMymfkkKmpZCu6-S value by preg_match function.