1

I am using chrome regex filter, to filter out the url list.

I am using the following regex:

^.*\.(?!css$|png|js|gif$)[^.]+$

Although is does also excludes urls that end with ?=

The urls that i could like to exclude are:

http://something.com/something.png
https://something.com/something.something.png

The urls that i would like to include are:

http://something.com/something
https://something.com/something/
http://something.com/something?=something
https://something.com/something?_=something
http://something.com/something.php
Alex D
  • 703
  • 2
  • 7
  • 23
  • Why should you care if it's at the end or anywhere else. Why not just match all strings that don't have (.css|.png|.js|.gif)? – Uncle Iroh Jun 13 '16 at 22:21
  • 2
    ^((?!(\.js|\.css|\.gif|\.png)).)*$ – Uncle Iroh Jun 13 '16 at 22:27
  • the regex above does not filter out anything. but your right i would like to filter out those 4 file extensions while keeping everything else. screenshot: http://postimg.org/image/wyp65u74n/ – Alex D Jun 14 '16 at 15:00
  • Well my friend Chrome Regex in the developer tools section is weird. That's all I can say. I'm not 100% clear on it -- but it's definitely filtering more than just the name. It seems to filter the content as well. Also it doesn't seem to be true regex -- it's like some hack job of regex. I tried a bunch of things and couldn't get any of them to work right. – Uncle Iroh Jun 14 '16 at 16:54
  • possible duplicate of http://stackoverflow.com/questions/14637278/is-there-a-way-to-filter-network-requests-using-google-chrome-developer-tools – Uncle Iroh Jun 14 '16 at 17:28

1 Answers1

3

Ah I found something that I think works for what you're wanting. It's not regex...but it is chrome developer tools filtering:

-mime-type:image/jpeg -mime-type:application/javascript -mime-type:text/css -mime-type:image/png -mime-type:image/gif

Make sure you uncheck the regex box. Then you should be good to go.

The - means "not include"

Full credit to: Is there a way to filter network requests using Google Chrome developer tools?

Community
  • 1
  • 1
Uncle Iroh
  • 5,748
  • 6
  • 48
  • 61
  • -mime-type:image/jpeg -mime-type:application/x-javascript -mime-type:text/css -mime-type:image/png -mime-type:image/gif your solution worked, just had to add "x-" in front of javascript – Alex D Jun 14 '16 at 18:34