Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
$var = 'Please enter Certificate Signing Request(CSR): Press <Enter> w +hen done MIICxjCCAa4CAQAwgYAxFzAVBgNVBAMTDnRlc3QtY2VydC11c2VyMQswCQYDVQQG EwJVUzELMAkGA1UECBMCTkMxDDAKBgNVBAcTA1JUUDEPMA0GA1UEChMGTkVUQVBQ MQwwCgYDVQQLEwNDU0kxHjAcBgkqhkiG9w0BCQEWD3VzZXJAbmV0YXBwLmNvbTCC ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK8ICjh7p3ATkfZhabMvpgus w6/qqyLqyguM9dB5emr1e08y70fx9EL6FZ9uXMzm2K5QtZ7hF/yEvv5N3kxMjq7q uMx13okKYqhnC266CIZs3a+Z5g72MnRHsQwffIOB9tvY0h9KjvICSXbdYj8w4I7E 7hI8EDxdwXaUC7SZapFrueRPLyCMxQh6OqRxUZdxT9zXh/hEYVy2GRLMq00/QcUR qPTuSPfbzfTXVl7tdIGZmH7z9/wKwf2UZbtQ4LSJxGIyfMNnT5DJmEOgmy8fBMXh AhDfFOANKsZHQSszAS/z6VRHWNoTsTNQGSD9JGApnKSKBsRt4CG4Yu6sh7kpSmkC AwEAAaAAMA0GCSqGSIb3DQEBCwUAA4IBAQAF3/sC4XNdYnh1bzUN1CYHJyjRPzGv oNxIBmAw2p/huLkJA7JttNn8xQ9lwrMw/yE3MVs4Q2UOk8Ku0XxG6dt50uZjF4sA s3Ck2qPG/ptoOQr4QuYBxnZXVhe0k0LqWIDI+xtoTYxqYwSEe5vOImdN8u9EkJSD Sv7L0bKqnC2N86RjupaS8stRyefkaOmRxJfA7In0IyYDr/5yDzEnQLJK+T+Ijtgi aWKLLW2sihdBsEgG4uJAQOa4rDfNco4FHmrIZOoYPfROWkCGbCerJKgzpN8JWluN w/QpewM+x9cdmDpJ+eOQyigsCDnkfjZEpHLVxFxQ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2Pa2Adti9ZSwzhwxjRcOD/qSrN3DR/EjuPFdPT1EyNvSOsw/2edsVWcAKp KB7MLblfq1zfxkAKMIO0vRJ4fVAyhke2pnWoz2plX86Vqv2Nv9Prw8V6iNpQrMCE 2O9KfqEP/Z3oHyHFcvgouVfe2caWBTtZeLFVwodf0GhRTtkM4zMkvfcOUr2utybp Gxqf/KABolKX1sZ6SSC16LkuR7OoJ7YBUMhrp+wjf/zjWCI= -----END CERTIFICATE-----'
Require a regex to match and obtain the complete string after "-----BEGIN CERTIFICATE-----" and before "-----END CERTIFICATE-----"
if ($var =~ /Signed(.*)\s+(.*)\s+(.*)/) { print"$3\n"; }

In reply to Regex required by vaibhav07

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (9)
    As of 2014-07-30 00:28 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (229 votes), past polls