Sameersetia Sameersetia - 1 year ago 85
SQL Question

ORACLE PL/SQL:Regex to add a space between leading dots of a String in oracle

For example

  • (.aa) becomes (. aa)

  • (..agsb) becomes (.. agsb)

Answer Source

Building on @Albert's response, this method doesn't have the space problem:

select regexp_replace('..agsb', '(\.+)([^. ])', '\1 \2') as output
from dual;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download