dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
739 stars 1.57k forks source link

RegEx pattern produces ParserError #930

Open gcordal opened 6 years ago

gcordal commented 6 years ago

I've tried this example and had the same parser error reported here: https://forums.asp.net/t/2088064.aspx?Membership+Password+Strength+Regular+Expression+Property


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

rpetrusha commented 6 years ago

Thanks for your feedback, @gcordal. We'll investigate, and in the meantime, we'll add this issue to our backlog.

//cc @Rick-Anderson @scottaddie can you help investigate?

Rick-Anderson commented 6 years ago

RegEx can be difficult to get correct. The asp.net forum lists a working RegEx. Are you have problems with the following?

<membership defaultProvider="SqlProvider"  
  userIsOnlineTimeWindow = "20>  
  <providers>  
    <add  
      name="SqlProvider"  
      type="System.Web.Security.SqlMembershipProvider"  
      connectionStringName="SqlServices"  
      requiresQuestionAndAnswer="true"  
      passwordStrengthRegularExpression=" @\"(?=.{6,})(?=(.*\d){1,})(?=(.*\W){1,})"  
      />  
   </providers>  
</membership>