I have text like
CacciaMagazineOttobre2020 RumoreFebbraio2021 To add a space between letters and numbers in this way
CacciaMagazineOttobre 2020 RumoreFebbraio 2021 I use this regex
Find: ([a-z])([0-9])
Replace: \1 \2
I try to understand how insert a space between uppercase and lowercase letters to have this final output
Caccia Magazine Ottobre 2020 Rumore Febbraio 2021 I try a regex like
Find: ([a-z])([A-Z])
Replace: \1 \2
but doesn't work.
21 Answer
Here is a way to go:
- Ctrl+H
- Find what:
(?<=[a-z])(?=[A-Z0-9]) - Replace with:
A SINGLE SPACE - CHECK Match case
- CHECK Wrap around
- CHECK Regular expression
- Replace all
Explanation:
(?<=[a-z]) # positive lookbehind, make sure we have a small letter before current position (?=[A-Z0-9]) # positive lookahead, make sure we have an uppercase or a digit after Screenshot (before):
Screenshot (after):
4