[pcre-dev] pcre problem

Pàgina inicial
Delete this message
Autor: fuzzy_4711
Data:  
A: pcre-dev
Assumpte: [pcre-dev] pcre problem
Hi.

I do have a problem I am not able to solve by myself and hope you are
able to help. I got this config:

PCRE version 8.11 2010-12-10
Compiled with
UTF-8 support
Unicode properties support
Newline sequence is LF
\R matches all Unicode newlines
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses heap

Here is my php-code:

$stringToParse = '<TFS901>Abama Golf</TFS901><AUH901>Abu Dhabi
Golf</AUH901><PMI901>Alcanada Golf</PMI901><AGP901>Alferini
Golf</AGP901><AGP902>Almenara Golf</AGP902>';


$LookFor = '/<(.+)([^>]|\n)*>((.|\s)*?)<\/\1(\\s)*>/i';

if (preg_match_all($LookFor, $stringToParse, $TagMatches)){
......

$stringToParse does not match in the above constellation.

This one is matching (without the last (5th) item):
$stringToParse = '<TFS901>Abama Golf</TFS901><AUH901>Abu Dhabi
Golf</AUH901><PMI901>Alcanada Golf</PMI901><AGP901>Alferini Golf</AGP901>';

I cannot reproduce but I also had mismatches with just 4 list entries.
Nevertheless it does not match when I have 5 items.

Where is my fault?
Thanks for you help.

-fuz