Changing the case of all text except the ones within single

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
manualph
Posts: 13
Joined: Mon Jan 04, 2010 7:08 am
Location: India

Changing the case of all text except the ones within single

Post by manualph »

Version 5.3.1

I want to convert codes like below to lower case (Ctrl+L) in one go. But i want to retain the case of the text within single quotes

Code: Select all

SELECT DOB_DT
                    INTO V_POT_J
                    FROM EMP_DTL
                   WHERE EMP_CAT_CODE_C = 'CONFIRMED'
                     AND TRAN_TYPE_C = 'BONUS'
                     AND EMP_ID_C = V_EMP_ID
                     AND EMP_DEP_J = 'Y'
                     AND DOB_DT <= V_YEAR_END_DT;
                EXCEPTION
                  WHEN NO_DATA_FOUND THEN
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Find what: ([^']*)(('[^']*')?)
Replace with: \L\1\E\2

[X] Regular expression

Replace All
This assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
manualph
Posts: 13
Joined: Mon Jan 04, 2010 7:08 am
Location: India

Post by manualph »

Thank you very much Ben Josephs
Post Reply