That regex obviously has some problems (e.g. useless repetition of | characters in a character class) but
I'm suspecting a logic error in the "real script" you
aren't showing us. Can we see the code that doesn't
work to compare to the code you show that you say does
work?
i found the problem while trying to throw the stuff into my scratchpad. grrr.
after applying some of [id:///300037]'s changes, i forgot to add something.
my testcase had: \s\D+
my realcase had: \s\D
i know there are probably other issues w/ the regex, but for now, it works .... :-\