Using Matches/Regex Replace on a string


I have got a string of the form “1.0 The car 1.1 The bus at 8pm 1.2 The route of the train” and I want to extract an array of the form: {The car, The bus at 8pm, The route of the train}. How would I go about doing this?

Thank you :slight_smile:

@indie9876 Can you check this workflow : (1.5 KB)


Thank you, that works perfectly!
Now, say I want to create an array of the form:
{1.0 The car, 1.1 The bus at 8pm etc} where I include the decimals, how would I do so?


@indie9876 Just Change the Regex Value in the Second Assign to the Value below and check if it works :

(?= \d+\.\d+)


Works perfectly! Thank you so much

1 Like

Hi, Sorry again! I’ve got one last question.
Say I have the string:
“1.0 Cat 1.1 Cat Fur 1.2 Paws 2.0 Dog 2.1 Dog Fur 2.2 Dog Food”
I want to extract the array:
“1.0 Cat, 2.0 Dog”
So I only want the decimals that end with 0 in a list :slight_smile:
Thank you again!

@indie9876 Check this Workflow : (1.5 KB)

1 Like

Works great!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.