What you need is look around assertion like .+? (?=abc).
See: Lookahead and Lookbehind Zero-Length Assertions
Be aware that [abc] isn't the same as abc. Inside brackets it's not a string - each character is just one of the possibilities. Outside the brackets it becomes the string.