Erlang regex not compiling

I am a beginner Erlang developer and trying to get a feel for the language.
I am writing an application to parse and extract metadata headers from chess .pgn files.
I would like to run the following regex:


While compiling, I get

{error,{"unmatched parentheses",11}}

I’ve tested the regex on in both Javascript and PCRE mode with successful compilation and matching. Is there something obvious I am missing?

Thank you for your time!

Hello and welcome,

It’s not helping for your regex, but I wrote a pgn parser with Erlang leex and yecc. I did not publish it on hex (too small).

You might find the regex I use in src/ :slight_smile:

This one is for tag.

1 Like

Thank you!