Regular Expressions 101

Community Patterns

Excel tab name cleaner

0

Regular Expression
PCRE (PHP <7.3)

/
[][:* ?\/\\]{1,}
/
gm

Description

Take a tab name and change invalid characters and squeezing them into a single space character.

The character class

[][:*?/\] 

Plus \x5C (backslash or «Reverse Solidus»), \x00 (Null), \x03 (Ctrl-C), and \x27 (Apostrophe)

Submitted by anonymous - 5 years ago