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
Highlighted
Moderator

Re: Regular Expressions

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

extracts a 10-digit number from the variable MYCAPTION.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today

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
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Compare images using the Region Checkpoint

See replies!

Converting UTC TimeDate in an Excel file

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors