You are here: PCRE false match with preg_match? « PHP « IT news, forums, messages
PCRE false match with preg_match?

Posted by Jens Schulze on 09/26/05 17:19

I recently encountered a strange behaviour, could someone please
countercheck it, to either tell me there is an error in my pattern?

I have a test string: "7005-N/52"
I have two match patterns: a) "/([0-9]*)\/(.*)/i"
b) "/([0-9]*)\-(.*)/i"
I check the test string with the help of preg_match, and they both
matched, but normally variant a) shouldn't have matched.

Normally I test my patterns with the tool "The Regex Coach", and
according to this tool it shouldn't have matched.
PHP version is 5.0.4, PCRE extension version is 4.5 01-December-2003

Thanks for any help or feedback,
Jens

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация