RegEx IX: Dot

Published by Alessandro Manicone in

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.
  • Find more info on RegEx and the dot in Resources.
  • You can find all the challenges of this series in my Basic RegEx collection.
Watch a quick demo on how Edabit works.