samedi 7 mars 2020

Regex to extract 1st word and replace One by 1

I am extracting some data and some of the output can be like this:

One person found this helpful 4 people found this helpful

I am looking for a regex to extract the 1st word and if the 1st word is One, replace it with 1

For the above, output will be: One person found this helpful: 1 4 people found this helpful: 4

Thanks




Aucun commentaire:

Enregistrer un commentaire