0
votes

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.

1

1 Answers

2
votes

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'