Community
Participate
Working Groups
Currently a negative matches has to be written ! a ~= ~/pattern/ which is ok in short expressions but makes it harder to read when expression are long, or combined with logical connectives where paranthesis are required. Implementing a "not matches" would be very simple. Selecting the operator is a bit tricky - it should read as "not matches", and the best choice seems to be: !~ But since matches is ~=, it should perhaps be (klunky) !~=. Changing the matches operator to =~ makes more sense (and brings the operator inline with ruby's notation). =~ matches !~ not matches =~ ~/pattern/ !~ ~/pattern/
Added !~ as not matches, but did not change the ~= operator. Added tests.