Near-optimal solution for Task 7 https://regex101.com/quiz/7. Optimal is 39 characters.
Credit to Danail Gabenski on stackoverflow for the \.\b trick.
\.\b