Skip to main content
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?

  • May 12, 2017
  • 3 replies
  • 49 views
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

itay
Supporter
Forum|alt.badge.img+19
  • Supporter
  • May 12, 2017
Hoi Hans,

 

 

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

 

 


itay
Supporter
Forum|alt.badge.img+19
  • Supporter
  • May 12, 2017

Hoi Hans,

Usually a \\d works just fine for numbers.

Groet,

Itay


david_r
Celebrity
  • May 12, 2017

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".