View Single Post
  #1  
Old 29.07.2020, 12:09
ominus ominus is offline
JD Alpha
 
Join Date: Jun 2012
Posts: 22
Default artstation.com Packagizer rule Help with negative lookahead regex

Hello

I need to create two different package rules for the same domain but based on whether it contains www. or not., since the original package name changes for each case.

more specifically, I have these two urls:
**External links are only visible to Support Staff****External links are only visible to Support Staff**
**External links are only visible to Support Staff****External links are only visible to Support Staff**

I use Source Contains with regex enabled and this pattern:
(?<!www)\.artstation\.com

but it matches both urls, when it should match only NAME.artstation.com and not WWW. artstation.com
I tested with multiple variations of the above pattern, always both urls match or they dont match at all.

some examples:
^(?<!www)\.artstation\.com none match
^(?<!www).+\.artstation\.com both match
(?!www)\.artstation\.com both match

what is strange, is that I test the pattern with this java regex tester, and the original pattern does work, it matches only the second url name.arstation.com as it should:
**External links are only visible to Support Staff****External links are only visible to Support Staff**

so what am I doing wrong here?

Last edited by ominus; 29.07.2020 at 12:13.
Reply With Quote