Displaying page
of
pages;
Items to
Title |
Test
Details
Strip Unquoted Whitespace
|
Expression |
(?:\s+)|((?:"(?:.+?)")|(?:'(?:.+?)'))
|
Description |
When removing any whitespace from something like an excel formula, you need to strip the whitespace from around cell references or other non-quoted strings, while leaving quoted (both single and double quotes) in tact. It even works when another different quote, or double quote is embedded in the string. You can execute this with a replacement group $1 to replace the spaces with another character (or empty string to remove the spaces). Does not match if the quoted string spans multiple lines (if \r\n is inside the quoted string)
|
Matches |
REGEX ROCKS
|
Non-Matches |
"SOME QUOTED STRING", "REGEX'S ROCKS", 'REGEX ROCKS'
|
Author |
Rating:
Chadwick Posey
|
Displaying page
of
pages;
Items to