On Sat, Jul 05, 2003 at 09:06:53AM -0700, Skot wrote:
> Hello,
> 
> I want to search a string for matching content,
> not quite getting it.
> 
> something like:
> 
> if ($myInputLine =~ m/.\123\.222/) { ... }


Your regex consists of 6 atoms, which must be matched in the precise
order in which they appear in order for the match to succeed.  These
atoms are:

atom            meaning
----            -------
.               match any single character except a newline 
\123            whatever was matched by the 123rd set of
                    capturing parens earlier in this regex 
                    [note you don't have such a thing]
\.              a literal period
2               a literal 2
2               a literal 2
2               a literal 2


Not quite sure what you wanted your re to match...you might try one of
these:

/.123\.222/       any non-newline,1,2,3,literal .,2,2,2
/\.123\.222/      literal .,1,2,3,literal .,2,2,2
/.\d{3}\.222/     any character,any three digits,literal .,2,2,2
/.\d*\.222/     any character,zero or more digits,literal .,2,2,2
/.\d+\.222/     any character,one or more digits,literal .,2,2,2


--Dks

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to