Jump to content

preg_match javascript


Pro.Luv

Recommended Posts

Hi,

 

Im still getting used to regex and I need some help could someone show

me how to match javascript like :

 

 

<script type="text/javascript">

function one(){
  code....
}

</script>

 

 

how can I match this in html code ?  I'm reading a file into a string I want to then find if theres

javascript in the code and remove it ?

 

Im using this to read the file:

$html =  file_get_contents("test.html");

 

Please help !

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/149644-preg_match-javascript/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.