Wildmat strange behavior
Posted: Mon May 01, 2006 3:43 am
When I use the following pattern "(1|1e|1x)01" and I would expect it to accept strings like "...101...", "...1e01..." or "...1x01...", but it does not (it returns nothing). And if I use "s0(1|1e|1x)01", I get almost all the headers.
I could use "(101|1e01|1x01)", but the pattern "(1|1e|1x)01" is a simplified version of a more complex pattern and I don't want use a text editor just for making a pattern that should be simple to make. Anyway, it becomes impractical to use a text editor when the pattern is something like "word0(word1|word2|word3)word4(word5|word6|word7)(word8|word9)"
The pattern "s01[ex]01" is equivalent to "(s01e01|s01x01), so why wouldn't "s0(1|1e|1x)01" or "s0(1|1[ex])01" be equivalent to (s0101|s01e01|s01x01)"?
I could use "(101|1e01|1x01)", but the pattern "(1|1e|1x)01" is a simplified version of a more complex pattern and I don't want use a text editor just for making a pattern that should be simple to make. Anyway, it becomes impractical to use a text editor when the pattern is something like "word0(word1|word2|word3)word4(word5|word6|word7)(word8|word9)"
The pattern "s01[ex]01" is equivalent to "(s01e01|s01x01), so why wouldn't "s0(1|1e|1x)01" or "s0(1|1[ex])01" be equivalent to (s0101|s01e01|s01x01)"?