Topic: problem adjusting to 6.15.2 regex. (1 of 6), Read 13 times
Conf: Search and Replace
From: Al Fairweather
Date: Friday, April 17, 2009 10:25 AM

Under the new version the regex is being too greedy and selecting the biggest range possible. In earlier versons I needed to tick REg-Exp Max to get the lot (which is this case I don't want anyway) - now I get the max even with plain Reg-Exp
Example data
"Fred","Jones","Main St. 123","65078 Town"
before
{.*}","
selected just "Fred"," meaning that \1 would allow you to construct "Fred Jones","Main St. 123","65078 Town"
now it selects "Fred","Jones","Main St. 123"," which makes joining Fred's name up impossible.
Somebody please help.
Thanks

 


Topic: Re: problem adjusting to 6.15.2 regex. (2 of 6), Read 13 times
Conf: Search and Replace
From: Christian Ziemski
Date: Friday, April 17, 2009 11:44 AM

On 17.04.2009 16:25 in vtech-search-replace Al Fairweather wrote:
>
> Under the new version the regex is being too greedy and selecting the
> biggest range possible.
>
> Example data "Fred","Jones","Main St. 123","65078 Town"
> before {.*}"," selected just "Fred"," [...]
> now it selects "Fred","Jones","Main St. 123","

That seems to be a bug.
Without grouping it works as expected.


BTW: As of Vedit 6.15 you should use the parentheses () and no longer
the curly braces {} for grouping.


Christian

 


Topic: Re: problem adjusting to 6.15.2 regex. (3 of 6), Read 13 times
Conf: Search and Replace
From: Al Fairweather
Date: Friday, April 17, 2009 11:57 AM

thanks for the prompt reply, even if it doesn't solve my problem, it's nice to know that I'm not being stupid.

Looks as if there are going to to be a whole raft of changes coming in the regex department, just when I had 6.14 sorted too :-)

Al

 


Topic: Re: problem adjusting to 6.15.2 regex. (5 of 6), Read 13 times
Conf: Search and Replace
From: Ted Green
Date: Friday, April 17, 2009 05:37 PM

At 11:45 AM 4/17/2009, vtech-search-replace Listmanager wrote:
>From: "Christian Ziemski"
>
>On 17.04.2009 16:25 in vtech-search-replace Al Fairweather wrote:
>>
>> Under the new version the regex is being too greedy and selecting the
>> biggest range possible.
>>
>> Example data "Fred","Jones","Main St. 123","65078 Town"
>> before {.*}"," selected just "Fred"," [...]
>> now it selects "Fred","Jones","Main St. 123","
>
>That seems to be a bug.
>Without grouping it works as expected.

Thanks for checking that Christian.
I probably won't fix this bug until I enhance the RE in VEDIT.

Ted.

 


Topic: Re: problem adjusting to 6.15.2 regex. (6 of 6), Read 13 times
Conf: Search and Replace
From: Pauli Lindgren
Date: Monday, April 20, 2009 03:38 AM

On 4/17/2009 5:37:55 PM, Ted Green wrote:
>At 11:45 AM 4/17/2009, vtech-search-replace
>>From: "Christian Ziemski"
>>
>>That seems to be a bug.
>>Without grouping it works as expected.
>
>Thanks for checking that Christian.
>I probably won't fix this bug until I
>enhance the RE in VEDIT.

It looks like using grouping causes regexp to be always maximized.

Looks like the same problem that was discussed in the thread RegExp, 10/22/2006
http://webboard.vedit.com/read?27500,33

I got the impression that this was already fixed, but a fixed version of Vedit has not been published.

--
Pauli

 


Topic: Re: problem adjusting to 6.15.2 regex. (4 of 6), Read 12 times
Conf: Search and Replace
From: Ted Green
Date: Friday, April 17, 2009 05:28 PM

At 10:25 AM 4/17/2009, you wrote:
>From: "Al Fairweather"
>
>Under the new version the regex is being too greedy and selecting the biggest range possible. In earlier versons I needed to tick REg-Exp Max to get the lot (which is this case I don't want anyway) - now I get the max even with plain Reg-Exp
>Example data
>"Fred","Jones","Main St. 123","65078 Town"
>before
>{.*}","
>selected just "Fred"," meaning that \1 would allow you to construct "Fred Jones","Main St. 123","65078 Town"
>now it selects "Fred","Jones","Main St. 123"," which makes joining Fred's name up impossible.

I haven't tried your specific example yet, but I don't think that VEDIT's RE "greedy" code has changed in many years.

Ted.