I am just learing about RegEx so bear with me.
I tried just splitting on /<script>/ and /<\/script>/ but if I were to load the HTML code with that script I end up with it being split on the lines that have the split command itself instead of just the opening and closing script tags.
I changed it to /\b<script>\b/ and /\b\/script>\b/ but it doesn't match anything and everything in the textarea is included in the array produced.
Here is the code I have now. How can change this to get the result I want?