Regex: Any Character Symbol

Regular Expression Any Character: .

You can use the any character reserved symbol (.) to instruct the Regular Expression pattern to match any single character.

Match '^.a'

Let’s match all lines that start with any character, but the second character must be the lowercase letter a:

grep '^.a' user.csv


grep ‘^.a’


This RegEx pattern '^.a' is combining the Line Begin Anchor and the match any character symbol .. RegEx allows you to mix and match the special syntax to create highly specific patterns.

Match '

grep '' user.csv


grep ‘.7@example’


The match any character symbol provides great flexibility for all patterns.