PROGRAMMING

m9/ REGEX
REMEMBERS




Last update:   22-10-2021

Start End

Get into the habit of interpreting regex in a rather literal way. Don't think ^cat matches if you have: a line with cat at the beginning. But rather ^cat mathces if you have: the beginning of a line, followed by c, by a, ...
 
/^cat/ # beggining
/cat$/ # end
/^$/ # empty line

FIND AT THE END   ☆

 

# Regex to find "cat" only at the end of the Text String
# Test String: My cat is a crazy cat

//g

Questions    
Classes

        A B C D E F
🔔
1/3