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

List<T>().Add problem C# -

Javascript natural sort array/object and maintain index association -