Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2:regex for identifying encrypted text

by Eily (Prior)
on May 16, 2018 at 16:25 UTC ( #1214664=note: print w/replies, xml ) Need Help??

in reply to Re: regex for identifying encrypted text
in thread regex for identifying encrypted text

/\-\-\-\-\-BEGIN ENCRYPTED PRIVATE KEY\-\-\-\-\-(.*?)\-\-\-\-\-END ENCRYPTED PRIVATE KEY\-\-\-\-\-/ will reliably match and capture
at least it will reliably compile. But . doesn't match \n unless you have the /s option for your regex. You were just one character away from code that actually works.

  • Comment on Re^2:regex for identifying encrypted text

Replies are listed 'Best First'.
Re^3: regex for identifying encrypted text
by sundialsvc4 (Abbot) on May 16, 2018 at 20:40 UTC

    “Well, foo!”   Edited the post.   Is that right now?   Or, if you prefer, post a correction.   Thanks.

    (Anyhow, mostly I was driving for the general idea:   that you can and should rely on the brackets and use them for this intended purpose.)

      That's better, thanks. We all told skendric to use the delimiters one way or another, with a useful addition from hippo stating that it can only be done if you try to do that before the delimiting lines are removed by the diff tool.

      brackets? what brackets? do you know what a bracket is?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1214664]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2018-07-21 19:04 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (450 votes). Check out past polls.