![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, The following works *everywhere* I've ran it: $ echo rbcde_fghijkl_mnopq|sed "s/_\([a-z]\)/\u\1/g" rbcdeFghijklMnopq (in vi, at several Unix prompts...: I want to replace letters that come after an underscore by their uppercase value, and get rid of this underscore) I've found no way to have the same behaviour using REGEXP_REPLACE: SQL> select regexp_replace('rbcde_fghijkl_mnopq','_\([a-z]\)','\u\1') from dual; REGEXP_REPLACE('RBC ------------------- rbcde_fghijkl_mnopq How can you then obtain in SQL what I'm getting above in Ux ? Thanks. Spendius |
#3
| |||
| |||
|
|
Hi, The following works *everywhere* I've ran it: $ echo rbcde_fghijkl_mnopq|sed "s/_\([a-z]\)/\u\1/g" rbcdeFghijklMnopq (in vi, at several Unix prompts...: I want to replace letters that come after an underscore by their uppercase value, and get rid of this underscore) I've found no way to have the same behaviour using REGEXP_REPLACE: SQL> select regexp_replace('rbcde_fghijkl_mnopq','_\([a-z]\)','\u\1') from dual; REGEXP_REPLACE('RBC ------------------- rbcde_fghijkl_mnopq How can you then obtain in SQL what I'm getting above in Ux ? Thanks. Spendius |
#4
| |||
| |||
|
|
On Jun 29, 5:06*am, Spendius <spend... (AT) muchomail (DOT) com> wrote: The following works *everywhere* I've ran it: $ echo rbcde_fghijkl_mnopq|sed "s/_\([a-z]\)/\u\1/g" rbcdeFghijklMnopq snip I've found no way to have the same behaviour using REGEXP_REPLACE: SQL> select regexp_replace('rbcde_fghijkl_mnopq','_\([a-z] \)','\u\1') from dual; REGEXP_REPLACE('RBC ------------------- rbcde_fghijkl_mnopq How can you then obtain in SQL what I'm getting above in Ux ? Well, initcap seems to work with underscores, then you get rid of the underscores? * 1 *select replace(replace(initcap ('dummy'||'rbcde_fghijkl_mnopq'),'_',''),'Dummy',' ') * 2* from dual JEG@TTST> / REPLACE(REPLACE(I ----------------- rbcdeFghijklMnopq |
![]() |
| Thread Tools | |
| Display Modes | |
| |