-
Basic vs. Extended Regular Expressions:
- In basic regular expressions these meta-characters lose their meaning:
? + { | ( )
- instead use the backslashed versions:
\? \+ \{ \| \( and \)
- Grep manual
- Open Group base specs:
- Basic regular expressions (POSIX based) - why Vim has to escape brackets
- In basic regular expressions these meta-characters lose their meaning:
-
replace uppercase with lowercase
- find all uppercase:
([A-Z])(.*)
L$1$2
--> will convert all letters in$1
and$2
to lowercasel$1$2
--> will only convert the first letter of$1
to lowercase and leave everything else as is- The same goes for uppercase with
U
andu
- find all uppercase: