I have a file which has jquery codes into the head section, like following..
<head>
<script>
$(document).ready(function(){
$('.x').click(function(){
// some thing
});
$('.y').click(function(){
// some thing
});
});
</script>
</head>
I want to use PHP to read the file and retrieve the content that are located inside the $(document).ready(function(){
section by using regular expression like preg_match_all
. More specifically saying I need the two .click
functions. Purpose is academic only. Any help will be appreciated.