How can I match a pattern as long as it’s not at the beginning with regex? March 22, 2023 by Tarik You can use a look behind to make sure it is not at the beginning. (?<!^)aaa