Sublime Forum

Regex pattern ([a-z])([A-Z]) doesn't seem to work

#1

I’m doing a search and replace with the following regex pattern: ([a-z])([A-Z]) -> $1 | $2
which essentially is supposed to search for “aH” or “zR” and replace it with “a | H” or “z | R”.

Essentially I am looking for the pattern lowercase-letter followed by uppercase-letter

Somehow ST Build 4121 locates the following: “Ha” or “aa”. (uppercase followed by lowercase). Is something wrong with my regex?

Thanks

0 Likes

#2

You’ve probably got the case sensitivity option in the find dialog disabled:

Screenshot%20from%202021-11-24%2014-23-23

1 Like