COMPUTER SCIENCE
Wolfram language, as term-rewriting system.
where you have pattern matching and replacement, similar to regular expression.
but regular expression works on strings, while the term-rewriting system basically considers the source code as string (sequence of symbols forming terms aka expression).

regular expression only matches basically linear expression.
Wolfram language pattern can match nested expression, so it can get very complex on just which part of expression are replaced, tree depth levels and priority.