E
eggie5
I'm trying to write a rake task to extract all the script tags out of
my html file and save them to an array. How can I do this?
Below is a snippet form my file management.rhtml, I would like to get
paths to the script files from all the script tags inside the <!--
scripts--> HTML comment tags.
Expected results are:
/javascripts/prototype.js,
management/javascripts/management.js,
/javascripts/scriptaculous.js,
/javascripts/effects.js,
/javascripts/controls.js
Snippet:
<!--scripts-->
<script type="text/javascript" src="/javascripts/prototype.js"></
script>
<script type="text/javascript" src="management/javascripts/
management.js"></script>
<script src="/javascripts/scriptaculous.js" type="text/
javascript"></script>
<script src="/javascripts/effects.js" type="text/javascript"></
script>
<script src="/javascripts/controls.js" type="text/javascript"></
script>
<!--endscripts-->
my html file and save them to an array. How can I do this?
Below is a snippet form my file management.rhtml, I would like to get
paths to the script files from all the script tags inside the <!--
scripts--> HTML comment tags.
Expected results are:
/javascripts/prototype.js,
management/javascripts/management.js,
/javascripts/scriptaculous.js,
/javascripts/effects.js,
/javascripts/controls.js
Snippet:
<!--scripts-->
<script type="text/javascript" src="/javascripts/prototype.js"></
script>
<script type="text/javascript" src="management/javascripts/
management.js"></script>
<script src="/javascripts/scriptaculous.js" type="text/
javascript"></script>
<script src="/javascripts/effects.js" type="text/javascript"></
script>
<script src="/javascripts/controls.js" type="text/javascript"></
script>
<!--endscripts-->