From: Sergey Degtyaryov <maga@globetravel.spb.ru> To: mandrake-russian@altlinux.ru Subject: Re: [mdk-re] Re: [mdk-re] офтопик - регулярные выражения Date: Sat May 19 04:28:01 2001 Message-ID: <20010519043850.70e85863.maga@globetravel.spb.ru> (raw) In-Reply-To: <20010519031007.C1625@localhost.localdomain> On Sat, 19 May 2001 03:10:07 +0400 Mikhail Zabaluev <mhz@alt-linux.org> wrote: > > Задача: > > Перловый скрипт. > > Есть одна длинная строка вынутая из файла html, сваленная в переменную: > > > > <li><font size=+1><a > > href=\"./CombatSystem/Drop_sequence.html">Последовательность действий > > перед боем.</a> Updated 9:05:2001</font></li> > > ./CombatSystem/Drop_sequence.html > > Последовательность действий перед боем. > > 9:05:2001 Именно данная строка (и подобные ей) разбирается так: #$text = '<li><font size=+1><a href="Линк">Название</a>Дата</font></li>'; $text =~ /<a href=(.*?)>(.*?)<\/a>(.*?)<\/font>/; print "$1, $2, $3\n"; Хотя лучше конечно посмотреть в сторону HTML::Parser > Нужно читать про модификаторы 'm' и 's' для перловых регулярных > выражений. Можно заработать небольшой отек головы (я до сих пор не > сразу вспоминаю, какой из них что дает), m - поиск, s - замена =) -- Господи, только бы она не глюUnhandled error ----- Rgds, maga, maga@mail.ru
next prev parent reply other threads:[~2001-05-19 4:28 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-05-16 18:06 cornet 2001-05-16 21:14 ` [mdk-re] офтопик -регулярныевыражения Sergei 2001-05-17 13:37 ` Vyt 2001-05-17 14:38 ` [mdk-re] " cornet 2001-05-19 2:55 ` [mdk-re] Re: [mdk-re] офтопик - регулярные выражения Mikhail Zabaluev 2001-05-19 4:28 ` Sergey Degtyaryov [this message] 2001-05-19 13:09 ` Mikhail Zabaluev 2001-05-21 14:04 ` cornet 2001-05-25 16:08 ` Anton Farygin 2001-05-25 16:50 ` [mdk-re] Re[2]: " Sergey Degtyaryov 2001-05-25 17:03 ` [mdk-re] " Alexander Bokovoy 2001-05-28 13:01 ` [mdk-re] помогите настроить RELAY в POSTFIX Serg 2001-05-28 13:07 ` Volkov Serge 2001-05-28 23:11 ` Sergey Vlasov 2001-05-27 18:54 ` [mdk-re] Re[2]: [mdk-re] Re: [mdk-re] офтопик - регул ярные выражения Anton Farygin 2001-05-27 21:59 ` [mdk-re] Re: [mdk-re] офтопик - регулярные выражения Mikhail Zabaluev 2001-05-28 8:23 ` Anton Farygin 2001-05-28 12:18 ` Mikhail Zabaluev 2001-05-28 12:56 ` Anton Farygin 2001-05-28 13:50 ` Баталов Григорий 2001-06-01 10:43 ` [mdk-re] Re: ÏÆÔÏÐÉË - ÒÅÇÕÌÑÒÎÙÅ ×ÙÒÁÖÅÎÉÑ Andrey Brindeew 2001-06-01 10:59 ` [mdk-re] Re: офтопик - регулярные выражения Anton Farygin 2001-06-01 11:18 ` [mdk-re] " Mikhail Zabaluev 2001-06-01 11:33 ` Anton Farygin 2001-06-01 14:53 ` [mdk-re] Re: ÏÆÔÏÐÉË - ÒÅÇÕÌÑÒÎÙÅ ×ÙÒÁÖÅÎÉÑ Andrey Brindeew 2001-06-02 15:04 ` [mdk-re] Re: [mdk-re] Re: офтопик - регулярные выражения Mikhail Zabaluev 2001-05-26 8:31 ` [mdk-re] " Maxim Savrilov 2001-05-26 18:10 ` Anton Farygin 2001-05-31 15:50 ` [mdk-re] " cornet
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=20010519043850.70e85863.maga@globetravel.spb.ru \ --to=maga@globetravel.spb.ru \ --cc=mandrake-russian@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