In computer science, lexical analysis, lexing or tokenization is the process of converting a sequence of characters (such as in a computer program or web page) into a sequence of tokens
Commonly stored as (name, value) tuples. Example:
Becomes:
(identifier, "my_variable")
(operator, "=")
(integer, 17)
1 + 24 - 22 * 38 / 4Grammar Automaton (Computer)
A string used as a search pattern for a member of a regular language.
? - zero or one occurrences of preceding element* - zero or more occurrences of preceding element+ - one or more occurrences of preceding element{n} - exactly n occurrences of preceding element[] may be used to match a single character
against a set of charactersSeveral special character classes are provided:
\w - alphanumeric characters\d - digits\s - whitespace characters. - anything