Search code examples
asp.netsaxon

saxon .net 9.7 Syntax error in regular expression: unrecognized flag 'n'


I've created an ASP.net application and installed saxon-he using the nugget package manager. I would like to use the n flag to Use the standard .NET regular expression engine, allowing native .NET regex syntax. This is supported on the .NET platform only.

However i'm getting the following error:

{"Syntax error in regular expression: unrecognized flag 'n'"}

Solution

  • From Michael on saxon mailing list:

    The code to support the "n" flag is there in the product, though I'm not sure whether it has been recently tested.

    Note that the flag must be separated from standard flags by a semicolon, e.g. flags="s;n" or flags=";n".

    I think that unlike other Saxon extensions this one is available in HE without a license key.

    Note also that you can set the .NET regex engine as your default by setting the configuration parameter "http://saxon.sf.net/feature/defaultRegexEngine" to the value "N".

    Michael Kay

    the semi colon fixed the issue