Page 1 of 1

Changing the case of all text except the ones within single

Posted: Tue Oct 12, 2010 10:23 am
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

Posted: Wed Oct 13, 2010 9:01 am
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

Posted: Mon Nov 01, 2010 12:57 pm
by manualph
Thank you very much Ben Josephs