messy
messy

Reputation: 21

VBscript regular expression

There is a txt file containing multiple lines with - Browser("something").page("something_else").webEdit("some").

I need to retrieve the names of the browser, page and fields (names surrounded by double quotes ) and replace the line with "something_somethingelse_some" (concatinating the names of the browser, page n filed respectively), please help.

the names can be anything so we should go with regex. Note we have to convert everything comes in the above format within the text file till the EOF..

Upvotes: 0

Views: 43

Answers (1)

Mustofa Rizwan
Mustofa Rizwan

Reputation: 10476

You may try this:

^Browser\("(.*?)"\).page\("(.*?)"\).webEdit\("(.*?)"\).*$

and replace by:

$1_$2_$3

Regex Demo

Upvotes: 1

Related Questions