Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Using /m when $ is followed by punctuation

by ikegami (Pope)
on Aug 05, 2014 at 22:48 UTC ( #1096369=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Using /m when $ is followed by punctuation
in thread Using /m when $ is followed by punctuation

I don't think you'd ever need to do that, but I can think of a couple of solutions:

  • (?x: $ )
  • (?=\n|\z) (if /m is in effect)
  • (?=\n?\z) (if /m isn't in effect)
  • (?![^\n]) (if /m isn't in effect)


Comment on Re^3: Using /m when $ is followed by punctuation
Select or Download Code
Re^4: Using /m when $ is followed by punctuation
by jrw (Scribe) on Aug 05, 2014 at 23:03 UTC
    Thanks, ikegami. I had remembered that there seemed to be no need for an interior $ followed by an escape, but I failed to think outside the box I had constructed for myself in the original question.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2014-12-22 03:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (110 votes), past polls