Regular Expression
Cheat Sheet
Regular Expression Anchors | Characters | Quantifiers
Start of Line^
White Space\s
Not White Space\S
Digit\d
Not Digit\D
Word\w
Not Word\W
Anything but New Line (Wildcard).
New Line\n
Carriage Return\r
Tab\t
Vertical Tab\v
Zero or More of the Preceding*
One or More of the Preceding+
Zero or One of the Preceding?
Exactly Three of the Preceding{3}
Three or More of the Preceding{3,}
Three, Four, or Five of the Preceding{3,5}
Groups and Ranges | Escape Sequences | String Replacement
Lowercase Letter from a to q[a-q]
Uppercase Letter from A to Q[A-Q]
Uppercase or Lowercase from A to Q[A-Qa-q]
Digit from 0-7[0-7]
Or|
Group(expressions)
Non-capturing Group(?:expressions)
Range (a or b or c)[abc]
Range (not a or b or c)[^abc]
Don't Treat the Following Character as RegEx\
Begin Literal Sequence\Q
End Literal Sequence\E
Replace Using the nth Set of Parenthesi$n
Use "xyz" in ^(xyz)(abc)$1
Use "xyz” in ^(abc)(xyz)$2
Use the Entire Matched String$&
Helpful Expressions
Remove Carriage (Hard) Returns
Find What\n([a-zàèìòùáéíóúýâêîôûãñõäëïöüy]{2})|\n(\s[a-zàèìòùáéíóúýâêîôûãñõäëïöüy]{2})|\n(\()|\n([0-9] )
Replace With$1$2$3$4
NoteRemember the space before the first $. This will probably work for 80 to 90 percent of the returns you encounter but can be manipulated to cover the rest – make sure to look over your document to make it worked).
Remove All Blank Lines (Contain Only Spaces or Nothing)
Find What^(\n*|\s+)\n
NoteReplace with nothing.
Find Any Line That Doesn’t Start with A Latitude Indicator
Find What^(\w|\(|\.|,|\?|\:|\;|\"|')
NoteThis will work for 99% of checks, but might not work if a line begins with a strange symbol is in a different language.
Delete Any Unnecessary Spaces at the End of A Line
Find What(\w|\.)( |\t)+\n
Replace With$1\n