What is Regex?
Regular expressions (regex) are patterns used to match text. Think of it as a supercharged search tool.
cat → matches "cat".. → Any single character.* → Zero or more of the preceding character.+ → One or more of the preceding character.
^ → Start of a line.$ → End of a line.^cat → matches "cat" at the start.
[aeiou] → Any one vowel.[^aeiou] → Any one non-vowel character.
(cat|dog) → Matches "cat" or "dog".
^a → Words starting with "a".e$ → Words ending with "e".^a.*e$ → Words starting with "a" and ending with "e".^cat$ → Matches exactly "cat" as a whole word.accept only matches → Only words that match the regex pattern in the input will be kept in the list. All others will be removed.remove matches → If a word matches the regex pattern in the input, it will be removed from the list of words.has all letters → Does not use regex. Only words which contain all of the letters will be retained.Regex is case-sensitive by default. Please stick to lowercase.
See the regex help page for more information as well as examples, and advanced details.