maffeis
Posts: 2
Joined: Wed Dec 14, 2011 2:14 pm

How to use regular expressions in Edit Text File Update

Hi

can somebody give me examples of regular expressions I can put into the "Edit Text File Update" text replacement tool?
The online help says its ECMAscript. I would like to see examples of ho to map a Java style regexp such as

John [.]+

into ECMAscript. Thanks!

Silvano
Attachments
screen shot
screen shot
regexp.png (43.49 KiB) Viewed 5370 times
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: How to use regular expressions in Edit Text File Update

Hi Silvano,

Unfortunately we don't have any samples in our user guide, but you can search the Internet to learn about ECMAScript.
Here's a good place to start.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Jimmy
Posts: 36
Joined: Thu Apr 12, 2012 1:13 pm

Re: How to use regular expressions in Edit Text File Update

Hi there

I run into a similar problem:
I got a config file, which contains credentials, which was installed by a previous version.
now, we have to update those entries, which can be variable.

I tried to find a solution to delete all lines which contains the string ".password="

The regular expression should be (as I recherched):

Code: Select all

^.*\.password=.*$
but: nothing happens at all.

It would be very kind to give me some advices.

THanks in advance
Jimmy
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to use regular expressions in Edit Text File Update

Hello Jimmy,

Can you use the following regular expression:

Code: Select all

^.*\.password=.*(\r\n)?
and see if the behavior still persist?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”