Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Efficient split for alpha numeric pairs in a row

by BrowserUk (Patriarch)
on Jul 01, 2015 at 07:55 UTC ( [id://1132766]=note: print w/replies, xml ) Need Help??


in reply to Efficient split for alpha numeric pairs in a row

pp $_ for map{ { m[([A-Z])([0-9.]+)]g } } split"\n", <<EOD; N260G02X142.05Y649.62I77.33J58.34H2M25 N265M20 N270G45 N275G01X304.78Y608.8C45.91M25 N280M20 N285G46C0 N290G03X324.39Y638.4I-69.58J67.4H2M25 N295M20 N300G45 N305G01X180.04Y592.89C326.5M25 N310X279.77Y586.78C26.5 N315X195.39Y584.57C336.5 N320X228.31Y579.58C355.92 EOD ;; { G => 02, H => 2, I => 77.33, J => 58.34, M => 25, N => 260, X => 142 +.05, Y => 649.62 } { M => 20, N => 265 } { G => 45, N => 270 } { C => 45.91, G => 01, M => 25, N => 275, X => 304.78, Y => 608.8 } { M => 20, N => 280 } { C => 0, G => 46, N => 285 } { G => 03, H => 2, J => 67.4, M => 25, N => 290, X => 324.39, Y => 638 +.4 } { M => 20, N => 295 } { G => 45, N => 300 } { C => 326.5, G => 01, M => 25, N => 305, X => 180.04, Y => 592.89 } { C => 26.5, N => 310, X => 279.77, Y => 586.78 } { C => 336.5, N => 315, X => 195.39, Y => 584.57 } { C => 355.92, N => 320, X => 228.31, Y => 579.58 }

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Replies are listed 'Best First'.
Re^2: Efficient split for alpha numeric pairs in a row
by merrymonk (Hermit) on Jul 01, 2015 at 08:24 UTC
    Many thanks for the almost instant replies. This is just what I was looking for!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1132766]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-18 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found