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'.
A reply falls below the community's threshold of quality. You may see it by logging in.