I’m don’t know regex really well, so can someone give me example how to fix this regex http://rubular.com/r/UdzYMJc9iE:
/\b([stack over flow]+)+\b/
not to match whitespaces and to match only exact words (stack matches ac as word, I want to match only stack), tia.
I want when we have ‘lorem etiam nam’ to match only these exact 3 words from the regex, without spaces.
I tried using \s, \S, /x, but there was no result..
If you only want to match three alternatives, use the
|syntax, and group them into normal parenthesis:Not sure about the
+or what exactly you wanted to match.