What do square brackets do in a substitution again? I'm an engineer and only get to do this stuff on rare occasions. The uphat means beginning of line, right? I'm lost.
=~ /\s/ work it harder make it better\ndo it faster makes us stronger\n/g;
Ya JERK! That song has been stuck in my head all weekend!
Square brackets are character lists that match for one character or a set [A|a] when preceeded by a carrot (^) it negates the selection.
The match is set against many lines that resemble onoz: {34534-345} (oorgle) thing: {34534-345-3453-4} (wiffle) lolwut: {34534-4534-5} (eggs)
Splitting the lines would make the match easy, but who wants to run another loop? So you have to write the match so it can only match one of the lines which means the regex has to be exact. Match "JOB ID:" followed by one or more non "{" characters, followed by a "{" character followed by one or more non "}" character, followed by a space, followed by a "(".
Most matches you can get away with .+ until you find another match, but not when you have a lot of similar lines.
Ok I still don't get it. I kinda sorta remember you could say [a-zA-Z] to catch any letter. Would adding a carrot make it any character that's NOT a letter?
If so, why... ok, I'm starting to get it. But why use [^{]+ instead of .* ?
Full time coders are mystical to me. My uphat is off to you.
It's an O'Reilly nutshell book on perl. The first one was pink, the second blue (there's prolly a dozen more since then). If perl has new functions since 1995, I'm blissfully unaware of them ('cept LWP which is all I really use it for these days).
Lily Burk's story is about a young girl's trust and our failure as a society. It includes a family friend of hers who joins the discussion and unbelievably offers the beliefs that perpetuate these horrors. Read the posts and comments starting here. Never forget that these people exist.
Remember James Broadnax
He wounded and executed two Christian music producers for $2 and a car so he wouldn't have to walk home. Watch the interview with the remorseless murderer that changed my life. Never forget that these people exist.
7 comments:
What do square brackets do in a substitution again? I'm an engineer and only get to do this stuff on rare occasions. The uphat means beginning of line, right? I'm lost.
=~ /\s/ work it harder make it better\ndo it faster makes us stronger\n/g;
Ya JERK! That song has been stuck in my head all weekend!
Square brackets are character lists that match for one character or a set [A|a] when preceeded by a carrot (^) it negates the selection.
The match is set against many lines that resemble
onoz: {34534-345} (oorgle)
thing: {34534-345-3453-4} (wiffle)
lolwut: {34534-4534-5} (eggs)
Splitting the lines would make the match easy, but who wants to run another loop? So you have to write the match so it can only match one of the lines which means the regex has to be exact.
Match "JOB ID:" followed by one or more non "{" characters, followed by a "{" character followed by one or more non "}" character, followed by a space, followed by a "(".
Most matches you can get away with .+ until you find another match, but not when you have a lot of similar lines.
Uphat, existingthing. It's called an uphat.
Ok I still don't get it. I kinda sorta remember you could say [a-zA-Z] to catch any letter. Would adding a carrot make it any character that's NOT a letter?
If so, why... ok, I'm starting to get it. But why use [^{]+ instead of .* ?
Full time coders are mystical to me. My uphat is off to you.
Ok, now I get it :), and it only took 24 hrs. Thanks for making me study page 25 of the pink book again.
Pink book? Which is this? I'm only familiar with the pink shirt book.
It's an O'Reilly nutshell book on perl. The first one was pink, the second blue (there's prolly a dozen more since then). If perl has new functions since 1995, I'm blissfully unaware of them ('cept LWP which is all I really use it for these days).
Post a Comment