Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2018-12-14 19:29 GMT
Find Nodes?
    Voting Booth?
    How many stories does it take before you've heard them all?

    Results (69 votes). Check out past polls.