in reply to Re: Re: Re: Re: Grep Pattern Match
in thread Grep Pattern Match
Ok. In a regex '.' means match any char. (*)
'*' means zero or more of the preceeding char. (**)
So '.*' just means any number of any characters. (*)
If you know for that you only want to match digits, then you would be better using \d* or if you know that there must be at least 2 then \d{2,}.
There's much to much to lay it all out here and it's already written many places perlre would be a good starting point. It will only take you 20 minutes to read it, and you won't take it all in at one go probably, but once you seen it, you'll probably remember were to look next time.
(*)(except \n except in special cases which we can ignore for now, but the internet laywers and perlitists may be watching:)
(**) more correctly, "preceding pattern"
Examine what is said, not who speaks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: Grep Pattern Match
by LostS (Friar) on Dec 27, 2002 at 16:18 UTC |