You might consider using Regexp::Common::net. It provides a convenient set of functions for matching IP v4, v6 and mac addresses.
https://metacpan.org/pod/Regexp::Common::net On Fri, 25 Oct 2019 at 19:43, John W. Krahn <jwkr...@shaw.ca> wrote: > On 2019-10-25 3:23 a.m., Maggie Q Roth wrote: > > Hello > > Hello. > > > There are two primary types of lines in the log: > > What are those two types? How do you define them? > > > > 60.191.38.xx / > > 42.120.161.xx /archives/1005 > > From my point of view those two lines have two fields, the first looks > like an IP address and the second looks like a file path. In other > words I can't distinguish the difference between these two "types". > > > > I know how to write regex to match each line, but don't get the good > result > > with one regex to match both lines. > > > > Can you help? > > Perhaps if you could describe the problem better? > > > John > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > >