Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: regex question

by morgon (Priest)
on Apr 01, 2020 at 19:34 UTC ( #11114925=note: print w/replies, xml ) Need Help??

in reply to Re: regex question
in thread regex question

Very imaginative, but in reality my lines look not like "1 A" but rather like "1 string1 string2 string3" and so your approach would not work anymore.

But your idea is cool.

Replies are listed 'Best First'.
Re^3: regex question
by AnomalousMonk (Bishop) on Apr 01, 2020 at 23:08 UTC

    Clear questions elicit clear and helpful answers. What should the content of your hash look like given the new data format? Do any of the other solutions given so far produce that structure | hash content?

    Give a man a fish:  <%-{-{-{-<

Re^3: regex question
by rsFalse (Hermit) on Apr 02, 2020 at 15:17 UTC
    If you want to match "1 string1" from "...\n1 string1 string2 string3\n...", use anchor '^', otherwise modifier 'm' is redundant. Did it help?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2020-05-31 10:36 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (173 votes). Check out past polls.