简体   繁体   中英

How to extract the number(0-9) from the string in informatica?

I want to extract the number(0-9) from the string. eg

  1. if src is *J$456*&56 then tgt should be 45656
  2. if src is &*(>123>>789&^ then tgt should be 123789

This is just an example, special characters or alphabets are random in string, so how to extract only numbers?

Thanks is advance.

Regards sheetal

You'd need to replace all other characters with an empty string. Try

REG_REPLACE(COLUMN_NAME, '[^0-9]', '')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM