Re: Regex Help



Dr.Ruud schreef:
inderpaul_s:

I'm a newbie to perl expression more or less. What I want to do is to
use a regex pattern to find the presence of an IP address within a
file or string.

Consider Regexp::Common, specifically $RE{net}{ipv4}.
http://search.cpan.org/~abigail/Regexp-Common/lib/Regexp/Common/net.pm

s/ipv4/IPv4/

--
Affijn, Ruud

"Gewoon is een tijger."

.



Relevant Pages

  • Re: Regex Help
    ... use a regex pattern to find the presence of an IP address within a ... file or string. ... "Gewoon is een tijger." ...
    (comp.lang.perl.misc)
  • Re: A string & a list
    ... You should exclude those elements from the string: ... The array @- is an internal one, storing the offsets of the substrings found by the last regex pattern match. ... The push of the results of the recursive call is qualified by a call to grepto make sure the new value isn't already in the list. ...
    (perl.beginners)
  • Re: get ole objects from powerpoint
    ... I'd probably check each shape for the presence of a textframe and then ... teh text string incrementally in Word to add that string. ... >Dim arrShapes As Variant ... > Dim oSh As Shape ...
    (microsoft.public.powerpoint)
  • Re: REGEX.Replace Question
    ... >> We are not talking about string literals. ... > to the static Regex.Replace function is a regex pattern. ... you'll realize that there's no way the replacement string can ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Skip an EXCEPTION!!!
    ... The following will compile but returns an error when I run ... the code because of the presence of the letter "c" on the third ... Another possibility, that of some are preferred, is to check if the String ...
    (comp.lang.java.programmer)