You can use a look behind to make sure it is not at the beginning. (?<!^)aaa
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
- Regex – Does not contain certain Characters
- 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
- Regular expression to match balanced parentheses
- How do I deal with special characters like \^$.?*|+()[{ in my regex?
- Regular expression that matches valid IPv6 addresses
- How to capture multiple repeated groups?
- Regular expression to allow spaces between words
- 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
- regex to remove ordinals
- Replace a word with multiple lines using sed?
- Regular Expression Vs. String Parsing
- Can extended regex implementations parse HTML?
- How to get Vim to highlight non-ascii characters?
- Remove everything except a certain pattern
- How does \b work when using regular expressions?