=REGEXWORDSONLY
The REGEXWORDSONLY function converts a text string into a valid regular expression that matches only the words in the input text while ignoring all punctuation and special characters.
Syntax
Section titled “Syntax”=REGEXWORDSONLY(TextToConvertToRegex)Parameters
Section titled “Parameters”TextToConvertToRegex – The text string that will be converted into a regex pattern.
How It Works
Section titled “How It Works”-
Takes the input text string.
-
Removes or ignores punctuation and special characters.
-
Converts spaces between words into a regex pattern (\W+) that matches any non-word characters.
-
Produces a regex string that matches the original words in sequence regardless of punctuation differences.
Usage Notes
Section titled “Usage Notes”-
Formula functions are case sensitive and must be written in ALL CAPS.
-
Useful for building flexible regex patterns from human-readable text.
-
Helps match phrases even when punctuation or spacing varies.
-
Often used together with functions like REGEXFIND for advanced text searching.
-
Preserves word order while generalizing separators.
Example
Section titled “Example”=REGEXWORDSONLY(I Want - To , Find * This ^ Text.)Returns
Section titled “Returns”I\W+Want\W+To\W+Find\W+This\W+TextKeywords
Section titled “Keywords”REGEXWORDSONLY, regex builder, word-only regex, remove punctuation, text to regex, pattern matching, flexible search, workflow formulas, formula function