Question: the following regex pattern seems to match online greek and courses in any order. However it will also match asdfagreek fafefonline afaefcourseswer. How do I add word boundaries? I've tried \b\s and can't seem to make it work.
it represents nothing on its own. In combination with ? (inside parentheses) it represents a grouping that isn't remembered for back-referencing. Technically, it's a mode change command. Empty, it just groups the enclosed data, but doesn't have the engine remember the contents of it.
some examples: (?i:blah) will use case insensitivity inside the grouping. (?m:blah) will use multi-line mode inside the grouping.
any of the pattern modifiers are allowed. You can combine them as well: (?im:blah) will use case insensitivity multi-line mode inside the grouping.
(?-i:pattern) == Turn's off the "i" modifier if it's used throughout the rest of the pattern
(?-s:pattern) == Turn's off the "s" modifer... you get the idea ;)