Smith, Derek schreef:
> Dr.Ruud:
>> sub SOB { '\A' }
>> sub EOB { '\z' }
>
> Are all these considered anonymous sub-routines?
No, see `perldoc perlsub`.
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAI
-Original Message-
From: Dr.Ruud [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 13, 2006 5:24 PM
To: beginners@perl.org
Subject: Re: Regexp help please
"Dr.Ruud" schreef:
> Slight revision, that fails on the last line:
More assuming revision:
#!/usr/bin/perl
use war
"Dr.Ruud" schreef:
> Slight revision, that fails on the last line:
More assuming revision:
#!/usr/bin/perl
use warnings ;
use strict ;
sub SOB { '\A' }
sub EOB { '\z' }
sub OR { join '|', @_ }
sub sp { '[[:blank:]]+' }
sub capture { "(@_)" }
sub optional
Brano Gerzo schreef:
> Dr.Ruud [DR], on Thursday, July 13, 2006 at 21:05 (+0200) wrote these
> comments:
>
>
> as you helped me much, here is example of RE:
>
> my $re =
>
'^\s*(?:(\d+)\s+)?(\w+(?:\s+\w+)*?)(?:\s+((?:sq|hy|ay|bs|bg|hr|cs|da|nl|
en|et|fi|fr|de|gr|he|hu|zh|it|ja|kk|lv|pl|pt|pb|ro|ru|
Brano Gerzo schreef:
> Dr.Ruud [DR], on Thursday, July 13, 2006 at 21:05 (+0200) made these
> points:
>
>> I don't understand what you try to match with "[\w\s\+:]+". It
>> matches any series of characters that belong to the character class
>> containing [[:word:]], [[:space:]], a plus and a colon.
Dr.Ruud [DR], on Thursday, July 13, 2006 at 21:05 (+0200) wrote these
comments:
as you helped me much, here is example of RE:
my $re =
'^\s*(?:(\d+)\s+)?(\w+(?:\s+\w+)*?)(?:\s+((?:sq|hy|ay|bs|bg|hr|cs|da|nl|en|et|fi|fr|de|gr|he|hu|zh|it|ja|kk|lv|pl|pt|pb|ro|ru|sr|sk|sl|es|sv|th|tr|uk|al)(?:\s*,
D. Bolliger [DB], on Thursday, July 13, 2006 at 21:48 (+0200) typed
the following:
DB> This data format is ambigous, consider:
I know, but I count with it in this case. This regexp is used only for
commands to bots, so there should be some "small" errors in parsing :)
if it passes to language,
Brano Gerzo am Donnerstag, 13. Juli 2006 21:23:
[...]
> yes, my example was ambiguous sorry, for that. Here are more examples:
>
> word
> word word
> word word word
> 1 word
> 1 word word word
> 1 word en,pt,sk
> 1 word en 1cd
>
> so:
> - first digits are optional
> - then it is followed by word(s)
Dr.Ruud [DR], on Thursday, July 13, 2006 at 21:05 (+0200) made these
points:
DR> I don't understand what you try to match with "[\w\s\+:]+". It matches
DR> any series of characters that belong to the character class containing
DR> [[:word:]], [[:space:]], a plus and a colon. So "a b :c" would matc
Brano Gerzo schreef:
> hello all!
>
> I'd like to request for help with this regexp. I want match
> these examples:
>
> word word
> 3 word word
> 3 word word en
> 3 word word en,pt
> 3 word word en,pt 1cd
>
> ok, here is regexp I wrote:
> ^\s*(\d{1,2}\s+)?([\w\s\+:]+)
> (sq|hy|ay|bs|bg|hr|cs|da|nl|
10 matches
Mail list logo