in reply to japh with re
Not just for what it does and how it does it, but because it's probably the first obfuscated code I've been able to figure out on my own. However, some things were just assumptions or guesses.
So, in an attempt to help me really wrap my mind around this, build up my hubris, and learn something; I would appreciate it if (a|some) more knowledgable monk(s?) could (explain|verify) the following magic:
1) I think I figured this one out. At first I was confused about the 4 digit sequences. I was thinking the ones that started with a zero were octal, and was coming up with an unintelligible character sequence. But then I recalled something about the default match delimiters acting like double quotes. I read elsewhere on this site that a "number" like 0100 is octal, but "0100" is decimal. So apparently the captured data in the match effectively is double quoted, in this case insuring the numbers are decimal?
2) I seem to recall reading, but can't find it anywhere right now; that in an expression like
3) I've never seen a do{} with the while inside the braces, is this the same effect as having it immediately after them?
4) I've never seen a block before a for. Is this a similar idiom to reversing an if and letting you do this?
5) I copied the code into my text editor and put spaces in between each 4 digit sequence of the data while I was trying to figure it out. After I figured it out, I saved it and ran it, but it didn't work. I had to remove the spaces. The \G saves your place in the data, but it doesn't act like an anchor does it? I mean, if there's now a space before the next set of 4 digits, shouldn't it just skip the space to get to the digits? It didn't seem to.
Sorry to go on so long, but I've found this to be a site of great knowledge, and am hoping to learn much here.
TheEnigma
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: japh with re
by Velaki (Chaplain) on Aug 19, 2004 at 22:01 UTC |