Possible Duplicate:
Regular expression to match string not containing a word?
How can I invert a regular expression in JavaScript?
Say I have the regex foo123
. How do I match everything that is not foo123?
Similarly, the negation variant of the character class is defined as "[^ ]" (with ^ within the square braces), it matches a single character which is not in the specified or set of possible characters. For example the regular expression [^abc] matches a single character except a or, b or, c.
Solution: This problem can be solved by using operators within the Assignment Element in Flow called "Remove Uncommon" and "Remove All". We will use assignment Element to de-duplicate the collection variable so that it can be used to Update/Delete Records.
Use negative lookahead for this.
(?!foo123).+
matches any string except foo123
If you want to match empty string also, use (?!foo123).*
In your case (according to the comment) the required regex is (?!P[0-9]{1,}).+
.
It matches P and 123, but not P123.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With