0

I want to exclude some urls from Live HTTP headers (firefox add-on).
so in Config area i checked Exclude URLs With regex and put the string below in it:

.gif$|.jpg$|.ico$|.css$|.js$|.png$|.bmp$|.jpeg$|google$|bing$|alexa$

i want to remove all images from capturing and any url that contains :
css - js - google - bing - alexa
what is the problem about my regex and would you please fix it for me?

thanks in advance

1 Answer 1

1
  • . means "any char"
  • $ means "the end of the string"

That said:

  • .gif$ will match "any string ending with gif that is at least 4-char long"
  • google$ will match "any string ending with google"

I guess you were looking for something like:

[.](gif|jpg|ico|css|js|png|bmp|jpeg)$|\b(google|bing|alexa)\b

Maybe your regexps get autoanchored with ^ and $ by the tool you're using. In this case, use .* additionally:

.*[.](gif|jpg|ico|css|js|png|bmp|jpeg)$|.*\b(google|bing|alexa)\b.*
Sign up to request clarification or add additional context in comments.

2 Comments

thanks for the answer / would you please show me how can i have (containing a string)?
@MoonLight Just put the string: google. If you want to match only the word: \bgoogle\b (strings like foogooglebar won't match then). Maybe the tool you're using autoanchors the regex with ^ and $, see my edit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.