in reply to Re: regex to substitute 3 stars at beginnning of string with none?
in thread regex to substitute 3 stars at beginnning of string with none?

Update: A quick test confirms what merlyn says below. I have to admit that the correct behavior surprised me, but sounds sensible in retrospect. Here's my original post, anyway:

To clarify: ([*]){3} is like ([*])([*])([*])

That means that $1, $2, $3 each contain one of the asterisk characters. The suggested solution ([*]{3}) has all three characters inside the same set of parentheses, and therefore saves them all into $1.

buckaduck

Replies are listed 'Best First'.
Re: Re: Re: regex to substitute 3 stars at beginnning of string with none?
by merlyn (Sage) on Apr 24, 2001 at 00:58 UTC