I have a string like '00122021300123024'
I want to remove only single '0' not '00' means out put should be '001222130012324'
[NOTE : I am using ORACLE 11g regexp_replace function]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Without look around, search for
([123456789]|^)0([123456789]|$)and replace by $1$2 where $1 is the first capturing group and $2 the second (or \1\2).For Oracle SQL:
Not tested but it should work.