139k views
2 votes
Write a single Python regular expression for each of the following. Note: For each problem, you must use only ONE regular expression.

Matches a string that has both the substring dog and cat in the string in either order. For instance, both of the following strings match: 'The dog chased the cat' and 'xxcatxxdogxx'.

User Benek
by
6.1k points

1 Answer

2 votes
Matches a string that has both the substring dog and car in the string in either order
User Zowens
by
7.1k points