All regexes first get combined into a single big disjunction. Then, for each match, the matching sub-regex is determined from a group name and the match object dispatched to a corresponding method, or simply replaced by a string.
A regular expression (regex) is a pattern that can be used to match a string of text. They are a standard feature of many programming languages that are used for text-processing purposes (and they have the inconvenient habit of being implemented ever-so-slightly differently in different languages).
ReReplace.com is an online utility for running find/replace routines on blocks of text (or code). Utilizing the php preg functions, it fully supports regular expressions. Queries can be saved for reuse.