$req =~ s/([^\n]{72,72})\n([^\n]{1,71})\n([^\n]{1,71})$/$1\n$2$3/

> # This regex appears to do nothing. It's looking for three matches, then
> replacing them with the matches found. It's like saying look for all
> instances of "one two three" in the string and replace them with "one two
> three". Although I could be wildly wrong on that. ;)

$req =~ s/([^\n]{72,72})\n([^\n]{1,71})\n([^\n]{1,71})$/$1\n$2$3/
          |            |  |           |  |           |\
          +----$1------+  +---$2------+  +----$3-----+ $

It is doing something.  It's looking at the end of $req (the $ that I
marked $ looks for end of the string).  If there are 72 characters that
are not '\n', followed by a \n, followed by 1-71 non-'\n' characters,
followed by a \n, followed by another 1-71 non-'\n' characters, followed
by the end of the string, then it takes out the second \n character.

Having not seen the rest of the code, I'd guess that they are somehow trying
to format line lengths.

I hope this helps.

                        /\/\ark


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to