^ Start of String
RX · Basic Patternssyntax
^patternexample
JS: /^Error/.test('Error: file missing') // true
JS: /^Error/.test('An Error occurred') // false
Py: bool(re.match(r'^Error', 'Error: file missing')) # Trueoutput
true, false, TrueNote Matches position at start of string. With the m (multiline) flag, ^ matches the start of each line instead. Do not confuse this with [^...] inside a character class, which means negation.