Topic: RegExp - repeating characters (1 of 3), Read 21 times
Conf: VEDIT Suggestions
From: Chris Tammes
Date: Thursday, March 30, 2006 06:50 AM

Hi,

Would it be possible to implement a simple way to add repeating characters to a RegExp search string?
I often do searches for lines, starting with a specific character string, followed by a (large) number of any character and ending with another specific string.

Example: search for lines starting with 22011, followed by 80 characters and then by 4 numbers.
Now, I type "^22011" followed by 80 dots. It would be nice to be able to replace those by ".{80}" or something like that.

Regards,
Chris Tammes

 


Topic: Re: RegExp - repeating characters (2 of 3), Read 19 times
Conf: VEDIT Suggestions
From: Fritz Heberlein
Date: Thursday, March 30, 2006 08:25 AM

At least, you could save time by producing your dots with a macro like
repeat(80){ins_text(".")}, setting that string to, say, TReg(10),
and inserting \@(10) into your search string.

Fritz

 


Topic: Re: RegExp - repeating characters (3 of 3), Read 20 times
Conf: VEDIT Suggestions
From: Ted Green
Date: Thursday, March 30, 2006 10:09 AM

At 06:51 AM 3/30/2006, you wrote:
>Would it be possible to implement a simple way to add repeating characters to a RegExp search string?
>I often do searches for lines, starting with a specific character string, followed by a (large) number of any character and ending with another specific string.
>
>Example: search for lines starting with 22011, followed by 80 characters and then by 4 numbers.
>Now, I type "^22011" followed by 80 dots. It would be nice to be able to replace those by ".{80}" or something like that.

Chris:

This is already in the works, but not yet ready for release.
As you may know, we just changed RE grouping from our old "{}" to "()". This follows newer RE standards, and "{}" will soon be implemented for repeat counts.

Ted.