Ask a Question

REgex to capture number

SOLVED
akilan
Occasional Contributor

REgex to capture number

I have a text response Example" Call 950000 saved". I need to capture only number "950000" and have to assign this to a variable.

What regex we use to capture only the number from above sentence..

 

Thanks in advance,

Akil

5 REPLIES 5
rraghvani
Champion Level 2


@rraghvani wrote:

See Regular Expressions Syntax. tutuapp vidmate


okay i got it thanks for the reply
akilan
Occasional Contributor

thanks for the response. 

I can see the way the regular exp works in the documentation. I'm using keyword test here and I want extract the number from the output(Call 950000 saved, need to capture only 95000).

Where do we put the regular exp syntax..is it while performing set variable value or during log message?

any example would be helpful.

 

Thanks,

Akilan

rraghvani
Champion Level 2

Here's an example which displays number(s) in the first paragraph using regular expression,

rraghvani_0-1686059825399.png

 

akilan
Occasional Contributor

Many thanks, appreciate your time.

cancel
Showing results for 
Search instead for 
Did you mean: