in reply to Regex (?(...)...)

Well... I think (?( doesn't do what you think it does.

See "(?(condition)yes-pattern|no-pattern)" in perlre.

And please look at the preview and use <code> tags before posting.

updated: formatting