Format of Session Key Event RegEx

This page of the manual discusses the Session Key Event RegEx option, but there aren’t many specifics on the regex language. Is there somewhere I can read about the required pattern? It doesn’t appear to match the python regex syntax, exactly.

I’d like to accept three specific key presses ><z followed by a number of digits (between 3 and 9) followed by a new line.

For a specific number of digits (5), this regex works, but I can’t figure out how to do a variable length.

><z[0-9]{5}

The key event regex is being executed on the frontend, so start your research from “Javascript regex” or “EMCAScript regex”. For a practical starting point, I can’t recommend regex101.com highly enough. E.G. for your example, I’d probably start from something like this:

Do note that for…complicated reasons, if you want to detect an enter keypress, you need to literally capture Enter in your pattern. More on that here: Perspective Key Event Regex New Line

1 Like

Thanks for getting me started. Down the rabbit hole I go!