The search method of a string expects a pattern, not a string.
Lookbehind assertions aren't supported in javascript, so you can't use <?=. Searching for that piece of text doesn't require lookahead and lookbehind assertions. The following pattern should do just fine:
I did make a small change to the selected data from the pattern compared to your regex: it's less greedy. Using my pattern it will only match text between 1 [kort] - [/kort] tag-pair. Your pattern would match against the first occurence of [kort] and the last occurence of [/kort], regardless of how many [kort] [/kort]-pairs there are in the string. I think this will give you a little speed boost, as less buffer need to be maintained while processing the regex query