No, I would know if "13" (means the 2 characters) are in "123" or "145637" I'm sorry if I did not the problem clear Gilles
-----Message d'origine----- De : Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Envoyé : jeudi 10 novembre 2005 02:43 À : Gilles Cc : beginners perl Objet : Re: Is it possible with RegEx On Nov 10, Gilles said: > I try do to a < simple > thing : > > Knowing If a string like "13" exist in a string like "123" > > Or if "37" exist in "12356789" You're not looking for '13', you're looking for '1......3'. The simplest way to do this is: if ("123" =~ /1.*3/) { print "found 1...3\n"; } -- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 % the cheated, we who for every service http://www.perlmonks.org/ % have long ago been overpaid? http://princeton.pm.org/ % -- Meister Eckhart -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
