negative regex in package.json [duplicate] - regex

This question already has answers here:
Regular expression to match a line that doesn't contain a word
(34 answers)
Closed 3 years ago.
In my package.json, I have a regex to process only the files that contain '.integration.'
The command is the following:
"test:integration": "jest .*\\.integration\\..*"
How can I select files that DON'T contain '.integration.' ?

Maybe, an expression similar to,
^(?!.*\\.integration\\.).*$
might be somewhat close, not sure though.
Demo

Related

Regex to exclude certain strings from path [duplicate]

This question already has answers here:
Regular expression to match a line that doesn't contain a word
(34 answers)
Closed 2 years ago.
I need a regex that will accept all paths except those that have /cantbe or /cantbe/this
So
this/is/ok/filename.tr
is a match but
this/is/ok/cantbe/filename.tr
or
this/is/ok/cantbe/this/filename.tr
are not matches.
I tried
.*(?!\/cant\/)(?!\/cant\/this).*\.tr
but the paths above are still matches
try this
^((?!\/cantbe\b).)*$
Try it out here
This is explained quite well on this question
Regular expression to match a line that doesn't contain a word

How to regex part of a string from and to some certain characters [duplicate]

This question already has an answer here:
Reference - What does this regex mean?
(1 answer)
Closed 3 years ago.
I have the following string and I want to find a proper regex for it, so I can use it in Regular Expression in Jmeter:
DocumentId_123456
The point is that every time the numbers have different length.
so basically I want everything between _ and the end of string.
Please try it, I guess it works in jmeter
DocumentId_(\d+)
Uou can check it here: [https://regex101.com/]

Regex for not aaa [duplicate]

This question already has answers here:
How to write a regex which matches all char-sequences without 'aaa'
(2 answers)
Closed 7 years ago.
I need a regex, idealy with only [a-z] | (string) ^ . * ? that will only match strings not containing the sequence "aaa", thus "bu","aa7a"etc. are accepted and "paaaaarot","aaaac","umraaaaaa" and such are not. It's really giving me a headache, so I'd be grateful for help (with short description, so I can understand how the solution works).
You can do it with a negative lookahead -
(?!.*aaa.*)
Not sure how to do it with only the primitives you suggest.

regex add questionmark as a character [duplicate]

This question already has answers here:
escaping question mark in regex javascript
(4 answers)
Closed 7 years ago.
I try to create a simple regex with a question mark based on the following string:
22969152008377?_uw=2884713357351
There should be any number at the beginning, followed by ?_uw= followed by any numbers. I am not able to add question mark to the regex. Thank you for help.
Just escape the question mark like this
\d*\?_uw=\d*
Regex101

Match all Strings without the word "authorize" in them [duplicate]

This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Java \ Pattern - how to write a pattern that verifies the lack of a string?
How can I match all strings without the word "authorize" in them via regular expressions? I tried *(authorize){0}* to no avail.
/^(?!.*authorize).*/
This uses a negative lookahead to ensure that the overall pattern will match only if the expression "authorize" cannot match anywhere in the input.