php regex: find inline javascript in HTML document -


i need find inline javascript php regex. can find external script, not inline, can me?

here pattern external:

"/<script(.*?)src(.*?)>(.*?)<\/script\s*>/smi" 

any ideas?

update: , <script> nodes without src attribute set:

"/<script((?:(?!src=).)*?)>(.*?)<\/script>/smix" 

(my first look-ahead regex ;))


Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -