I'm trying to find a straight forward way to use regex to match any string n number of characters or longer while also allowing the ability to exclude a pattern from that count.
For example, if I have:
somename
somename-with-more-text
somename-with-even-more-text
somename2
somename-with-standard-naming
somename-ttt-ttt01-naming
somename-ggg-abc09-naming
I can use the regex .{24,}
to return only strings with 24 or more characters, which returns:
somename-with-even-more-text
somename-with-standard-naming
somename-ttt-ttt01-naming
somename-ggg-abc09-naming
But now I'd like to also go a step further and exclude a pattern; a literal string or regex. For example, I'd like to exclude ttt-ttt01
or maybe [a-z]{3}\d{2}
. So I would be left with:
somename-with-even-more-text
somename-with-standard-naming
somename-ggg-abc09-naming
or
somename-with-even-more-text
somename-with-standard-naming
I've gotten nowhere fast trying a variety of solutions...some examples of failed attempts:
.{24,}(?<!b[a-z]{3}\d{2})
^(?!ttt01)(.{24,})
^\b(.{24,})\b(?<!ttt01)
.{24,}(?!ttt01\b)\b\w+