PROGRAMMING

 
REMEMBERS




Last update:   29-10-2021

Negated class character

! Something NOT 1...6 If you use [^..] instead of [..], the class matches any character that isn't listed. For example [^1-6] matches a character that's not 1 through 6.
 
[^1-6]
Regex [^x] doesn't mean "match unless there is an x". But rather "match if there is something that is not x"

Negation vs start

NOT vs. start of the line. The ^ used here is the same as start-of-line caret. But the meaning is completely different.
 
^cat // find at start of the line

[^cat] // fint not ...

Examples

q[^u] matches Iraqi, Iraqian q[^u] doesn't match Qantas, because it called for a lower case q q[^u] doesn't match Iraq, because q is at the end (Newline character is not [^u]) Task

Regex to find letter in quotes in Text String
 
//q

The letters in guotes are "a" and "g" and "z"
Regex to find lines that doesn't have numbers at the start of the line.
 
//qm

The letters in guotes are "a" and "g" and "z"
123

Questions    
Any character

        A B C D E F
🔔
1/4