Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Import Macro Repair

...

Simple Examples


Table plus
autoNumbertrue


Value
Regex
Matches
Demonstrates
ABCA.C(tick). matches any single character
ABCA.*(tick)

* indicates 0 or more characters

ABC.*C(tick)
 

A.BA\.B(tick)Escape special regex characters with backslash if necessary
ABCAB*(error)

Regex is NOT generic matching (smile)

ABCA.+(tick)+ indicates 1 or more
ABCABC.+(error)
 

ABCABC.*(tick)
 

ABCDABC.*(tick)
 

ABC[ABCD](tick)[ ] indicates a class of characters
ABC[ABZ](error)
 

ABC8[A-Z0-9](tick)

- indicates a range of characters

ABC[AB^C](error)^ in a class means NOT the following character
ABCDEF|ABC(tick)| indicates OR
image.png.*png|.*jpg(tick)
 

image.jpg.*png|.*jpg(tick)
 

image.JPG.*png|.*jpg(error)defaults to case sensitive matching
image.JPG(?i).*png|.*jpg(tick)

(?i) indicates case insensitive matching

ABAB(AB)+(tick)() indicates a grouping
ABCD(AB)+(error)
 

112233\d+(tick)\d for digits
A BA\s*B(tick)\s for whitespace
ABC\S*(tick)\S for non whitespace
 

\S+(error)Value must have at least 1 non whitespace character
A\S+(tick)
 

XYZ,ABC,UVW.*\bABC\b.*(tick)Word boundaries. Finding words in a comma or blank separated list using word boundaries
XYZ,ABCD,UVW.*\bABC\b.*(error)
 

ABC(?m)(^ABC$)|(^ABC,)|(,ABC,)|(,ABC$)(tick)Looking for text matches in a comma separated list by covering all cases: only, start, middle, and end. This uses the multi-line flag: (?m).
XYZ,ABC,UVW(?m)(^ABC$)|(^ABC,)|(,ABC,)|(,ABC$)(tick)
 

XYZ,ABC DEF,UVW(?m)(^ABC$)|(^ABC,)|(,ABC,)|(,ABC$)(error)
 


Advanced Examples

Value
Regex
Matches
FindDemonstrates
example.txt 
^((?!\.png).)*$
(error)(tick)
Match
Find string not containing a word. In this example, files that do not have a .png extension
example.png 
^((?!\.png).)*$
(error)
Match
(error)Find string not containing a word. In this example, files that do not have a .png extension
example.jpeg(?=^((?!\.png).)*$)(?=^((?!\.jpeg).)*$)(error)(error)Find string not containing a word. In this example, files that do not have a .png or .jpeg extension
collateral wholesale retail.*(?=.*\bretail\b.*)(?=.*\bcollateral\b.*).*(tick)
Match exact words anywhere in string. In this case a blank separated list of labels and we require both collateral and retail to be included before we want the match to be successful
wholesale retail.*(?=.*\bretail\b.*)(?=.*\bcollateral\b.*).*(error)
Both are required for a match
merger acquisition.*\b(?:merger|acquisition)\b.*(tick)
Match string containing either word

Filter by label (Content by label)
showLabelsfalse
excerpttrue
titleContent with regex label
excerptTypesimple
cqllabel = "regex"
labelsregex

...

...