Regexp-thingie broken
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=51
Reported by Martin Nilsson, IDA nilsson@pike.ida.liu.se
The magic regexp-thingie that Per wrote for the default-tag behaves different under pike 7.1 than 7.0. The affected code in rxmltags.pike
array split_on_option( string what, Regexp r )
{
array a = r->split( what );
if( !a )
return ({ what });
return split_on_option( a[0], r ) + a[1..];
}
and the call
Regexp r = Regexp( "(.*)<([Oo][Pp][Tt][Ii][Oo][Nn])([^>]*)>(.*)" );
array(string) tmp=split_on_option(c,r);
The same indata c () yields
({ /* 7 elements */ "", "option", " value="x"", "", "option", " value="y"", "" })
on pike 7.0 and
({ /* 4 elements */ "<option value="x">", "option", " value="y"", "" })
on pike 7.1.