Sublime Forum

Regex Find and Replace randomly changes letters

#1

Hi

I have frustrating problem. I’m trying to find and replace using regex and when it replaces, it randomly changes letters to upper and lower case.

I have followed tips found on the forum to turn off “Preserve Case” (Case sensitive - in my find/replace), but still the same result. I’ve reinstalled Sublime Text and have restarted my computer, nothing seems to rid me of this annoyance.

It changes this:

SP14,Building Control,PaymentMethod: Transfer,457634,89749822,GBP,

Using this: (?:.+),(.+),(PaymentMethod:.+,GBP,) $1,$1,$2

To this:

BUildIng contrOl,buildIng conTrol,payMentmethod: Transfer,457634,89749822,GBP,

If anyone could help, please, I’d appreciate it. I’m having to use TextMate instead at the moment, as Sublime refuses to comply.

Thanks!

0 Likes

#2

I’m not familiar with that theme, but the lock icon in the bottom left is where the Preserve Case option is, and it looks like it’s still turned on. What you’re turning off in your capture is the case sensitiveness of the match. I’d try also turning off Preserve Case and see if that helps.

2 Likes

#3

Wow, thanks. That’s worked. What an idiot I am! :laughing:

0 Likes