Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8853175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:35:12+00:00 2026-06-14T13:35:12+00:00

I have a 2 part question: How can I get the regex expression of

  • 0

I have a 2 part question:

  1. How can I get the regex expression of an XSD facet and then use it to determine if a string matches the restriction? In my mind, this is “How do I convert XML Schema regex to .NET Regex“, but I’m open for suggestions if you have another way for me to do it other than converting the expression.

  2. If the test (#1) fails, how can I use the XSD pattern regex to automatically create a string which does satisfy the constraint?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:35:13+00:00Added an answer on June 14, 2026 at 1:35 pm
    1. XmlSchemaDatatype.ParseValue is your answer. Assuming the associated simple type has more facets and you only want to validate against the pattern one(s), then you have to simply find the enumeration facet in the XmlSchemaSimpleTypeRestriction.Facets, use a copy of that to create a new XmlSchemaSimpleType, with a new XmlSchemaSimpleTypeRestriction Content and new pattern facet(s) using the values you scooped above. Then using this newly created simple type, invoke XmlSchemaDatatype.ParseValue.

      I would advise against your suggestion in the comment, since the regex “dialects” are different.

    2. I am not aware of such a thing, available for free or otherwise. I am sure it can be done but I never found something that would actually work, when I needed it myself. If you do find one, please share.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about extracting a part of a string. For example I
I have a three part question based on a dataframe (df is example rows)
Multiple part question on running gvim on windows xp. I have a _vimrc file
This is two part question: I have two stored procedures: sp1 & sp2. If
This is probably a multi-part question. Background: we have a native (c++) library that
i have this simple question please. I have this part of code which sets
I have seen this question that talks about getting the last part of a
I have a question concerning active record association, referring to this part of the
Two part question: Does the iPhone have a unique ID other than it's MAC
I will start by saying that this is a 2-part question. I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.