Title: Theory / Unimportant / CS / Programming / Regular Expressions; / pattern;
Tags: FromInstruction computer_to_instruction fromDeuxSens hasNotNewEffectReturnsMeaning automatedNewLineAfterCommaSpace

Instruction: re1|re2
Effect: Match regular expression re1 or re2

Instruction: Match any character (except NEWLINE)
Effect: .

Instruction: ^
Effect: Match start of string
Language: regexp

Instruction: Match end of string
Effect: $
Context: Regexp

Instruction: Match 0 or more occurrences of preceding RE
Effect: *

Instruction: Match 1 or more occurrences of preceding RE
Effect: +

Instruction: Match 0 or 1 occurence of preceding RE
Effect: ?

Instruction: {N}
Effect: Match N occurences of preceding RE
Language: Regexp

Instruction: Match from M to N occurrences of preceding RE
Effect: {M, N}

Instruction: Match any single character from character class
Effect: [. . .]

Instruction: Match any single character in the range from x to y
Effect: [. . x-y. .]

Instruction: Do not match any character from character class, indluding any ranges if present.
Effect: [^. . . ]

Instruction: Apply "non-greedy" versions of above occurances/repetition symbols (
  *,
  +,
  ?,
  {}
)
Effect: ( * | + | ? | { } )?

Instruction: Match any decimal digit, same as [0-9], and do not match any.
Effect: \d
\D (Do not match any)

Instruction: Match any alphanumeric character, same as [ A-Za-z0-9_]
Effect: \w
\W (inverse)

Instruction: Match any whitespace character, same as [ \n \t \r \v \f ]
Effect: \s
\S (inverse)

Instruction: Match any word boundary
Effect: \b
\B (inverse)

Instruction: Match enclosed RE and save as subgroup
Effect: (. . .)

Instruction: Match saved subgroup nn (see (. . . ))
Effect: \nn

Instruction: Match any special character c, literally, without it's meaning
Effect: \c for any special character c

Instruction: match start(end) of string
Effect: \A
\Z (end)