Regex: Processing patterns in text
Regex: Processing patterns in text
Many programming languages feature regular expressions—or “regex” for short—which are used to find patterns in strings of text. A regex library is a mini-language for describing patterns, which can be combined with utilities to extract and work with the patterns found in your text. This article introduces you to using regular expressions in your programs.
How regular expressions work
Some say a set of regular expressions comprises a domain-specific language, or DSL; essentially, a mini-programming language. A full-blown programming language like Java or Python can do many things, but regex does one thing only: match text against patterns.
Many programming languages feature regular expressions—or “regex” for short—which are used to find patterns in strings of text. A regex library is a mini-language for describing patterns, which can be combined with utilities to extract and work with the patterns found in your text. This article introduces you to using regular expressions in your programs.
How regular expressions work
Some say a set of regular expressions comprises a domain-specific language, or DSL; essentially, a mini-programming language. A full-blown programming language like Java or Python can do many things, but regex does one thing only: match text against patterns.