Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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 (Archbishop) 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 (Chaplain) 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2023-03-25 15:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (63 votes). Check out past polls.

    Notices?