Comment on AutoRegexparentComments−Blackthorn4yAssuming you're using a non-backtracking library, they should both be O(n).
Comments
Assuming you're using a non-backtracking library, they should both be O(n).