← Back to challenges

RegEx IX: Dot

PythonHardlanguage_fundamentalsformattingregex

Instructions

Write the regular expression that matches all the words in the string below. Use dot . in your expression.

Example

pattern = "yourregularexpressionhere"
txt = "eta, edu, etc, ele, epa, eye, exe, emf, ete, eon, era"

re.findall(pattern, txt) ➞ ["eta", "edu", "etc", "ele", "epa", "eye", "exe", "emf", "ete", "eon", "era"]

Notes

  • You don't need to write a function, just the pattern.
  • Do not remove import re from the code.
  • You can find all the challenges of this series in my Basic RegEx collection.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Random Number Generator