cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Expressions

SOLVED
Highlighted
Valued Contributor

Re: Regular Expressions

assuming you are using python below will work

 

Log.message(re.sub("\D", "", "Motor - Ad 1112223445 name name"))
Highlighted
Contributor

Re: Regular Expressions

Hello NisHera,

I'm using jscript but I will attempt to translate from python.

Thanks for your reply
Moderator

Re: Regular Expressions

MYCAPTION.match(/\d{10}/)[0]

extracts a 10-digit number from the variable MYCAPTION.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

Highlighted
Contributor

Re: Regular Expressions

Many Thanks Helen,

 

You are the Testcomplete Chief !

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors