Both expressions work for me:
E1=> work(?:\s+)?group
E2=> work(\s+)?group
I need to capture workgroup
OR work group
considering the space could be a line break (\s+)?
However, the first expression has a non-capture groups (?:
and I am wondering if it is worse or better in the performance/fast output of the Regex. In other words, in terms of performance, what is the best expression?