Page 1 of 1

Pls help with REGEX Text case conversion

Posted: Fri Jul 13, 2012 8:34 pm
by huddlbud
I am trying to convert the text between the ^ and the . to lower case. See example below.

SCRIPTNAME "^RJ_UNIX^ ^COMMON_U^EPTAXTOS.ksh"

I only want to change the text indicated and want to leave everything else unchanged. The length of the text can vary. It might be 5 characters or 7 or 9 or 12.

I have tried everything I know to try. Here is what I have:

Find: \^.......\.ksh
Replace: \L\1

The net result is that it deletes everything after the ^ so I end up with this:

SCRIPTNAME "^RJ_UNIX^ ^COMMON_U\1"

Thanks in advance for any assistance.

-Bud

Posted: Fri Jul 13, 2012 10:05 pm
by ben_josephs
Use "Posix" regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
Search | Replace... (<F8>):
Find what: \^([^.^]+)\.
Replace with: ^\L\1.