Regex exclusion problem

Hi,
I'm trying to hit all pages at malwaretips.com except pages under the "blogs" category. Malwaretips always uses the https protocol, and its addresses look like:

https://malwaretips.com/forums/news-section.71/

I want to exclude blog pages like:

https://malwaretips.com/blogs/installed-enterprise-policy-removal/

I have a simple CSS that works on the malwaretips.com domain. But when I switch it to the following regex spec, the CSS is not applied to any page on the domain:

@-moz-document regexp("https?://malwaretips\\.com(?!/blogs.*)") {

The problem is probably simple. I tried to apply the comments in the following thread to my problem, but got nowhere. I would appreciate some guidance here. Thanks much.

https://forum.userstyles.org/discussion/comment/101814

Comments

  • edited February 2016 Chrome
    @-moz-doc is for Firefox. Nothing like that goes in the Chrome or Slimjet editor. Single backslashes instead of double are required.

    In "applies to" section select "matches the regexp", enter:
    https?://malwaretips\.com/(?!blogs).*
    in the corresponding field and save.
  • edited February 2016 Chrome
    Hi,
    Thanks for your reply. I Exported the CSS to get that regex, but in the Stylish here in Slimjet (Chromium) I have single backslashes.

    Here is what I had, straight out of the Applies to field:

    https?://malwaretips\.com(?!/blogs.*)

    Changing it to

    https?://malwaretips\.com/(?!blogs).*

    works perfectly. Can you tell me the significance of moving the last .* out of the exclusion pattern?

    Thanks much.

    EDIT: Also, I had placed the slash after ".com" inside the exclusion pattern because the home page doesn't have a slash, and I wanted to hit it. But it is hitting the home page even with the slash as part of the root pattern. I'm not sure why that is happening.
  • edited February 2016 Chrome
    Copy the homepage url from the address bar and paste it anywhere else. The last slash is there, it just isn't shown.

    The exclusion is implemented if that string of characters is in that place of the pattern. Wildcards can be useful before or within the exclusion string, but aren't necessary after.

    .* means any string of characters. Putting (?!blogs) before it means any string of characters after url's containing "blogs" in that place in the pattern have been excluded.

    Edit: changed some possibly confusing wording.
  • A ha. Very tricky about that hidden slash at the end.

    Confused about the wildcard positioning. I would swear that having it inside the exclusion pattern broke the regex functionality. Only when I moved it outside, according to your regex, did the regex work. But now the regex works whether the .* is in or outside the subpattern, or omitted altogether. Well, I'll keep it in mind if I have any further problems. Thanks much once again!
  • @calico

    Can I get a writing style analysis? Either I'm getting jaded or they're all starting to seem alike.
  • @calico

    Can I get a writing style analysis? Either I'm getting jaded or they're all starting to seem alike.

    Lol, you're not getting jaded anagrammar. I'm actually glad you noticed, as similar writing styles are an expected result of the rare 5 planet planetary alignment that began in late January. Not to worry tho', as the next full moon reverses the effects of this celestial phenomenon, and peace will guide the forum again.

    image
  • @calico

    Thanks for confirming. I'm obviously not very good at detecting writing styles, but
    paul b. said:

    the regex works whether the .* is in or outside the subpattern, or omitted altogether.

    now that sounds like some familiar nonsense.

    Has the same jackass hacked some old accounts, or have they been pulling this shit since forever? That account goes back to 2009.
    calico said:

    Not to worry tho', as the next full moon reverses the effects of this celestial phenomenon, and peace will guide the forum again.

    Are you just waxing poetic, or is there some plan to put an end to this bullshit? As it is right now, I'm just gonna start assuming anyone I'm not directly familiar with is trolling.
  • edited February 2016 Firefox
    I was just being silly, of course. Since the forum update, along with the pm's not working, my permissions changed and as a result I can't confirm much about anybody. I have no idea if Jason (or Vanilla) is going to do anything to correct any of this, so I have to choose to not worry about it. I'm just glad you're here and willing to assist other users, and hope that won't change.
  • I have no idea what is going on here. Very strange. If I've offended you in some way, I'm sorry. I appreciate you help, and tried to express myself clearly. I can't do better than that. If this continues I will unsub the thread.
  • If this continues I will unsub the thread.

    image

  • edited February 2016 Firefox

    now that sounds like some familiar nonsense.

    paul b. said:
  • calico said:

    Since the forum update, along with the pm's not working, my permissions changed and as a result I can't confirm much about anybody.


    Been declawed, have you? We know now that Jason wasn't procrastinating the forum update, he was procrastinating all the procrastination involved in getting it working correctly afterwards.
Sign In or Register to comment.