^[^<>]+$
The caret in the character class ([^
) means match anything but, so this means, beginning of string, then one or more of anything except <
and >
, then the end of the string.
More Related Contents:
- Regular expression to match a line that doesn’t contain a word
- Regular expression for a string containing one word but not another
- How to negate the whole regex?
- Regular expression that doesn’t contain certain string [duplicate]
- How to exclude a specific string constant? [duplicate]
- Regex: match pattern as long as it’s not in the beginning
- How can I match a pattern as long as it’s not at the beginning with regex?
- Negate characters in Regular Expression [closed]
- Regex to get the words after matching string [duplicate]
- Regex: Matching by exclusion, without look-ahead – is it possible?
- Unix grep regex containing ‘x’ but not containing ‘y’
- Regular Expression to exclude set of Keywords
- How do I turn any regex into an complement of itself without complex hand editing?
- RegEx for Multi-Words Without Numbers and Any Special Characters
- What is this pattern “\\s*\\^++\\s*” used for? [duplicate]
- Regular expression to match balanced parentheses
- How do I deal with special characters like \^$.?*|+()[{ in my regex?
- How to capture multiple repeated groups?
- Regular expression to enforce complex passwords, matching 3 out of 4 rules
- Regex: Specify “space or start of string” and “space or end of string”
- Delete all content but keeping matched
- regex for zip-code
- Regex to match 2 digits, optional decimal, two digits
- Extracting top-level and second-level domain from a URL using regex
- HTML5 input pattern search for quote
- When should I not use regular expressions?
- Replace a word with multiple lines using sed?
- Can extended regex implementations parse HTML?
- How to get Vim to highlight non-ascii characters?
- Regexp for subdomain