a01 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I need my Perl script to unescape a JavaScript string literal that is in a <script> tag in HTML code that I need to parse. For example:
<script type="text/javascript">window.open ('https\x3a\x2f\x2fexample. +com')</script>
If I capture the string with a regular expression, I get the string:
https\x3a\x2f\x2fexample.com
I need to decode this to:
https://example.com
How do I do this in Perl?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Unescaping JavaScript string (encode/decode)
by Anonymous Monk on Mar 18, 2016 at 04:32 UTC | |
Re: Unescaping JavaScript string
by 1nickt (Canon) on Mar 18, 2016 at 04:25 UTC | |
by bart (Canon) on Mar 18, 2016 at 11:35 UTC | |
by Your Mother (Archbishop) on Mar 18, 2016 at 13:39 UTC | |
by Anonymous Monk on Mar 18, 2016 at 04:34 UTC |
Back to
Seekers of Perl Wisdom