ash wrote:
Hello fellow scripters!

Hello,

I've come across weird regex like this: (.{4}).(.{21}).(.{3})..(.{3}).
(.{10}).(.{9}).
Has anyone any idea about the syntax of these regex? Thank you for
your help.

The period (.) matches any character except the newline character unless the /s option is used and then it matches any character including the newline character.

So that expression matches 4 characters and stores them in $1 then matches 1 character then matches 21 characters and stores them in $2 then matches 1 character then matches 3 characters and stores them in $3 then matches 2 characters then matches 3 characters and stores them in $4 then matches 1 character then matches 10 characters and stores them in $5 then matches 1 character then matches 9 characters and stores them in $6 then matches 1 character.


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to