[ad_1]
I would like to write a regex in oracle to find the number before ‘M(CAT)’ or ‘F(CAT)’. The number could be a whole number or a decimal.
Examples:
1. 5.4M(PIG), 8F(COW), 1F(DOG), 2.9M(CAT) -- answer should be 2.9
2. 2F(PIG), 7.4M(COW), 4.6F(DOG), 3F(CAT) -- answer should be 3
3. 1.5M(CAT) -- answer should be 1.5
4. 4F(PIG), 12F(CAT) -- answer should be 12
5. 7F(COW), 2.3M(DOG) -- answer should be null
6. 7.2F(COW) -- answer should be null
[ad_2]