0

I have a string which has repeated values "There are 14 no of pigs and 11 no of cows and many more".Here in this string I want to find the substring starting with number and ending with animal names and replace with some other string.

tried with this. But it selects complete string (\b\d+.* (pig|cow|chicken)s?\b) And not the individual substrings.

bvakiti
  • 3,243
  • 4
  • 17
  • 26

0 Answers0