Code mirror search not working with regex

I am using codemirror version 5.49.2 and trying to use the search addon and the search works fine when searching for simple strings. However when i search for regex pattern, the search does not return any results, I tried to use the syntax to wrap the regex like this ‘//’, for example, to search for all strings ending with substring ‘tion’, I tried searching for - /*/tion - this doesnt yield any result, on the search demo page as well https://codemirror.net/demo/search.html .
Am i providing the search string incorrectly or is something else wrong? Can you please clarify?

What you want is /.*tion/. The slashes go around the entire regular expression, and in regular expressions a star applies to the element before it, so putting it on its own doesn’t mean anything.