Pls help with REGEX Text case conversion

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
huddlbud
Posts: 1
Joined: Fri Jul 13, 2012 8:25 pm

Pls help with REGEX Text case conversion

Post 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
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post 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.
Post Reply