I\'m trying to split a string using a regular expression.
Friday 1Friday 11 JAN 11
The output I want to achieve is
[\'Fr
The problem is the capturing parentheses. This syntax: (?:...) makes them non-capturing. Try:
(?:...)
p = re.compile(r'((?:Friday|Saturday)\s*\d{1,2})')