> either a dot or a space
or a literal pipe symbol | ²
The OP seems to think he can have two alternative character classes inside [...]
To achieve this he needs (?:[CLASS1]|[CLASS2]) ... (the ?: is for not catching).°
Probably he just confused it with (\.|\s) or (?:\.|\s)
Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery
°) Sorry, in hindsight this doesn't make much sense (?:[CLASS1]|[CLASS2]) is the same like [CLASS1CLASS2] , 'or'-operations follow associative law
²) and the [\.] is redundant, it's the same like [.] and won't match everything
In reply to Re^2: Regex, match one or other character class
by LanX
in thread Regex, match one or other character class
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |