You could use a negative look-ahead assertion:
^(?!tbd_).+
Or a negative look-behind assertion:
(^.{1,3}$|^.{4}(?<!tbd_).*)
Or just plain old character sets and alternations:
^([^t]|t($|[^b]|b($|[^d]|d($|[^_])))).*
More Related Contents:
- Is it possible to escape regex metacharacters reliably with sed
- Regex: match everything but a specific pattern
- How can I match “anything up until this sequence of characters” in a regular expression?
- bash regex with quotes?
- Regular expression for duplicate words
- Regular Expression for alphanumeric and underscores
- Regular expression to match any character being repeated more than 10 times
- Parsing scientific notation sensibly?
- Regex: matching up to the first occurrence of a character
- Regular expression to skip character in capture group
- RegExp exclusion, looking for a word not followed by another
- Regular expression matching
- How to use ‘-prune’ option of ‘find’ in sh?
- Regular expressions in a Bash case statement
- Regex – how to match everything except a particular pattern
- Regex matching in a Bash if statement
- Does lookbehind work in sed?
- Regex for time in hh:mm am/pm format
- Grammatical inference of regular expressions for given finite list of representative strings?
- R split on delimiter (split) keep the delimiter (split)
- Regex with replace in Golang
- Regex empty string or email
- Does \w match all alphanumeric characters defined in the Unicode standard?
- Regular Expression to exclude set of Keywords
- Invert match with regexp [duplicate]
- extract number after specific string
- Redirect all traffic to root of another domain
- ignoring changes matching a string in git diff
- ElasticSearch and Regex queries
- Regex allow digits and a single dot