regex
1 TopicMultiple spaces in a regex
Hello folks. I was trying to write a regex that would detect Secret S E C R E T S e c r e t se C re T ie, 'secret', case-insensitive and possibly with spaces between the letters (manual kerning) When I use (?i)\bs[ ]?e[ ]?c[ ]?r[ ]?e[ ]?t\b Then the first two cases succeed and words like "secretive" or "nonsecret" are not detected (which is correct). I'm aware that I could probably also just do " ?" (space, question mark) as there is a single character in the set. I tried swapping the "?" question mark (zero or one occurrences) to an "*" asterisk (zero or many occurrences), "*?" asterisk, question mark (lazy zero or many occurrences) and then " {0,}" all of which work fine in regex101 but, at least in Exchange Online, they fail test three and four. Has anyone got any advice on what I might try for multiple spaces? Is Exchange swapping two spaces for a completely different character? Ta, TimSolved163Views2likes2Comments