Regex help

ajuda

I just want to extract the engine’s cylinder capacity. Example:
1.8

I’m using the function:
regexMatcher ($ Car $, “[0-9] \. [0-9]”)

more is not working can someone help me?fXfgFX2.png)

My assumption is that all of the strings are in the format car x.y rest and you want to extract the x.y.
To get the x.y you could use the regex

.* (\d*.\d*)

That looks for any string followed by a space, exctracts the coming digits, a dot and digits
You may check the regex using https://regex101.com/r/Bq32F5/2

3 Likes

If you want to actually extract the value, using that node to return a true or false doesn’t seem helpful. Palladian makes a good node for this - Regex Extractor.

Your use case in the attached workflow.
ranalyt_car.knwf (10.6 KB)

6 Likes

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