What is regex?

Regex is an abbreviation of Regular Expression, a well-known tool for matching text patterns. It is usually used to extract information from code, log files and other texts. In regex, a pattern is defined by characters that regex then tries to find/match in a string or text.

If you find it difficult to understand a regex pattern or you want to test the pattern on a text, quickly and easily, I recommend the page https://regex101.com/. You enter a pattern and a text. You will get an explanation of the different parts of the pattern.

#Revision history

  • 2019-08-20: (A, lew) First edition.

Document source.