if you're using javascript or perl (and possibly others), the "/" character is the pattern delimiter, so it needs to be escaped. in b4x, we use quotes as the delimiter,
but in, eg, javascript, to match "hello", you create a regex pattern using /hello/
also, note in a regex class, you don't have to escape . or -, as in the pattern shown. in a class, a dot (.) is a dot. you don't need \. and hyphen (-) is valid by itself if position either right after the [ or right before the closing ]. eg, "[a-zA-Z0-9.-]"
(from regular-expressions.info: The hyphen can be included right after the opening bracket, or right before the closing bracket, or right after the negating caret. Both [-x] and [x-] match an x or a hyphen. [^-x] and [^x-] match any character that is not an x or a hyphen.)