Sure.
EcmaScript compliancy for regular expressions controls various aspects
of how the regex engine behaves for them. These aspects include whether
unicode character classes support is enabled or not (EcmaScript does not
support unicode), how certain types of character escapes are treated and
how backreferences are interpreted [1].
You can set EcmaScript compliancy as all of the other regular expression
options, using a combination of the values of the RegexOptions
enumeration [2], applied to the Regex constructor.
[1]
http://msdn.microsoft.com/library/en-us/cpgenref/html/gngrfEcmaScriptVsCanonicalMatchingBehavior.asp
[2]
http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.regexoptions.aspx
HTH,
Efran Cobisi
http://www.cobisi.com
Paul Cowan wrote:
Hi,
How would I set or indeed not set EcmaScript compliancy, I have never heard of it.Is it possible you could explain a bit more?
ThanksPaul
[EMAIL PROTECTED]
Date: Wed, 14 Mar 2007 10:16:36 +0100> From: [EMAIL PROTECTED]> Subject: Re: [ADVANCED-DOTNET] Regular experession and non latin characters> To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM> > Hi Paul,> > To me the best solution is:> > ^[\w.,()\-\'\s]{3,} (make sure EcmaScript
compliancy is not set)> > Remember that \w, which is at the root of my solution, behaves> differently while in EcmaScript compliant vs noncompliant mode:> EcmaScript compliant \w maps to [a-zA-Z_0-9]> EcmaScript noncompliant \w maps to [\p{Ll}\p{Lu}\p{Lt}\p{Lo}\p{Nd}\p{Pc}]>
> So there should not be any need to include unicode character sequences> or their code (very ugly!).> HTH,> > Efran Cobisi> http://www.cobisi.com> > Paul Cowan wrote:> > Hi,> >> > I have the following regular expression that I use to allow valid
characters.> >> > ^[A-Za-z0-9.,()\-\'\s]{3,}> >> > The problem is I now need to open it out to include non latin characters like acute and grave etc.> > I have no idea how to do this in a regular expression.Can anyone help me?> >> > Cheers> >>
> Paul> > [EMAIL PROTECTED]> > _________________________________________________________________> > Discover the new Windows Vista> > http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE> > ===================================> >
This list is hosted by DevelopMentor® http://www.develop.com> >> > View archives and manage your subscription(s) at http://discuss.develop.com> >> > ===================================> This list is hosted by DevelopMentor® http://www.develop.com> > View archives
and manage your subscription(s) at http://discuss.develop.com
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com