From: "Sergey V. Degtyaryov" <maga@beltel.ru>
To: community@altlinux.ru
Subject: Re: [Comm] [OFF] Perl regex
Date: Mon, 22 Mar 2004 23:30:31 +0300
Message-ID: <405F4CE7.4020805@beltel.ru> (raw)
In-Reply-To: <405F1A36.7090406@ricom.ru>
Alexey Morsov wrote:
>> AM> Igor Homyakov wrote:
>>
>>>> это классика !
>>>>
>>>> ^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.
>>>> ([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])$
>>>>
>>
>> AM> Уважаемый - это разве короче?
>>
>> Зато правильно, в отличие от приведенных вариантов. В смысле, вытащит
>> только валидные адреса.
>
> дык я ж спрашивал как короче а не как валиднее - не валидно быть не
> могет потому что логи моего сквида - и сетка моя - ip сам даю за мзду 8-)
Если Вас интересует краткость:
use NetAddr::IP::Find;
$num_found = find_ipaddrs($text, \&callback);
На всякий случай -- regexp там такой же, как у Вас, т.е. неправильный.
--
С уважением, Сергей Дегтярев
XMMS :
next prev parent reply other threads:[~2004-03-22 20:30 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-22 13:52 Alexey Morsov
2004-03-22 14:19 ` Andrey Rybak
2004-03-22 14:32 ` Alexey Morsov
2004-03-22 21:50 ` [Comm] " Денис Смирнов
2004-03-22 15:04 ` [Comm] " Igor Homyakov
2004-03-22 15:13 ` Alexey Morsov
2004-03-22 15:29 ` Igor Homyakov
2004-03-22 15:44 ` Re[2]: " Maksim Otstavnov
2004-03-22 16:54 ` Alexey Morsov
2004-03-22 20:30 ` Sergey V. Degtyaryov [this message]
2004-03-22 21:01 ` [Comm] " Konstantin A. Lepikhov
2004-03-23 7:13 ` [Comm] " Alexey Morsov
2004-03-23 5:07 ` Mike Lykov
2004-03-23 7:16 ` Alexey Morsov
2004-03-23 11:00 ` [Comm] " Денис Смирнов
2004-03-23 15:19 ` [Comm] " Alexey Morsov
2004-03-23 15:36 ` [Comm] " Michael Shigorin
2004-03-23 15:41 ` Alexey Morsov
2004-03-24 7:15 ` Andrey Rybak
2004-03-24 16:49 ` Michael Shigorin
2004-03-22 18:20 ` [Comm] " Alexander Leschinsky
2004-03-23 7:19 ` Alexey Morsov
2004-03-23 8:35 ` Alexey I. Froloff
2004-03-23 9:00 ` Alexey Morsov
2004-03-23 15:53 ` Artem K. Jouravsky
2004-03-23 5:01 ` Mike Lykov
2004-03-23 7:21 ` Alexey Morsov
2004-03-23 7:47 ` Mike Lykov
2004-03-23 10:58 ` [Comm] " Денис Смирнов
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=405F4CE7.4020805@beltel.ru \
--to=maga@beltel.ru \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git