I’m writing a Regex to substitute the maximum of the next two words after the matching point.
Here is my current Regex:
(s|^|^(.*)|()(dr|docteur|pr|professeur)(s|[.])(s*([A-Z]w+)){0,2}
However, it doesn’t account for an ending parenthesis, as shown in the following image: [include image link or description here]
Really appreciate the help to improve the Regex. Thank you!