Ven Raj
Ven Raj

Reputation: 47

informatica scenario for replacing char

I have the following data

Package

6-pack

5-pack

2x12-pack

3x14-pack

How to get below desired output

Package

6

5

12

14

Please help me with this in informatica.

Upvotes: 0

Views: 68

Answers (1)

Samik
Samik

Reputation: 3455

Using Regular Expression:

REG_EXTRACT(input_field,'(\d*x?)(\d+)(-pack)',2)

Explanation:

  • (\d*x?) - matches zero or more digits with optional 'x'
  • (\d+) - matches one or more digits [desired group]
  • (-pack) - matches '-pack'

Upvotes: 2

Related Questions