Question

I want to grab numbers out of a string. Using the StringSearcher with reg expr "[0-9]+" does not give results, while using the reg expr " [0-9]+" (watch the leading space) does. What do I do wrong?



3 replies

Badge +16
Hoi Hans,

 

 

That depends on your input string....can you share an example?

 

 

Badge +16

Hoi Hans,

Usually a \\d works just fine for numbers.

Groet,

Itay

Userlevel 4

This will give you the first occurring group (one ore more) of digits inside the attribute "string", returned in attribute "_first_match"

Example: "test123abc" as input will return "123".

Reply