regex - remove number and special character using owa_pattern -


using owa_pattern.change in oracle 9i.

is possible remove number , trailing special character (pls note trailing) special character in string?

i refer special character characters neither word nor number. e.g _ , # , @ ,$ etc ...

for example.

string = test_string_10

desired output test_string (notice trailing special character _ removed).

i have figured out how remove number stuck in special character part.

i have code far.

owa_pattern.change (string, '\d', '', 'g'); 

appreciate inputs.

thanks!

try following.

owa_pattern.change (string, '[^a-za-z]+$', ''); 

regular expression

[^a-za-z]+    character except: 'a' 'z', 'a' 'z'                (1 or more times (matching amount possible))  $            before optional \n, , end of string 

Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -