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

  • Home
  • SEARCH
  • 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 7308165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:31:12+00:00 2026-05-28T23:31:12+00:00

Mono’s Regex implementation has a bug which means it does not handle regex character

  • 0

Mono’s Regex implementation has a bug which means it does not handle regex character class subtraction correctly.

IE: “[ab-[a]]” should in effect be the character set “[b]”.

For example the following code on .NET will output “The\ncat\nsat\non\nthe\nmat”.
This example contains the simplified regex that I am trying to make work on mono.

string listOfUnicodeChars = "\u2e80";  
string patten =  
"[\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lo}‌‍\\p{Mn}\\p{Mc}\\p{Lm}-[" + listofUnicodeChars +"]]+";

Regex regex = new Regex(pattern);
foreach (var match in regex.Matches("The cat sat on the mat."))
   Console.WriteLine(match);

but using mono the regex matches nothing.

Does anyone have any suggestions about how to get the same affect with the regex written a different way?

  • 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-05-28T23:31:13+00:00Added an answer on May 28, 2026 at 11:31 pm

    Have you considered using a negative lookahead? Such as:

    "(?![" + listOfUnicodeChars + "])[\\p{Lu}" + ... + "]"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does Mono .NET support and compile C++ / CLI? If not, do you know
Does Mono miss any functionality from .NET? If not, when will we see official
Has anyone used Mono, the open source .NET implementation on a large or medium
Has Mono been ported to the iPhone yet? I'd love to write .NET apps
Mono seems to support .NET 3.5 only, but does that mean I cannot run
We're using Mono.Cecil in our project. Does it have any functionality that allows me
Which version of Mono do I need to convert and run the Windows applications
Using Mono on Linux, is there any way to create a standalone executable which
Does Mono support XAML? Specifically I'm thinking of switching to using XAML for new
Does mono touch allow you to do cross iPhone communication? (iPhones in the same

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.