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 6391161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:38:18+00:00 2026-05-25T03:38:18+00:00

Rather than describing what I want (it’s difficult to explain), Let me provide an

  • 0

Rather than describing what I want (it’s difficult to explain), Let me provide an example of what I need to accomplish in C# using a regular expression:

"HelloWorld" should be transformed to "Hello World" 
"HelloWORld" should be transformed to "Hello WO Rld" //Two consecutive letters in capital should be treatead as one word
"helloworld" should be transformed to "helloworld"

EDIT:

"HellOWORLd" should be transformed to "Hell OW OR Ld"

Every 2-consecutive capital letters should be considered one word.

Is this possible?

  • 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-25T03:38:19+00:00Added an answer on May 25, 2026 at 3:38 am

    This is fully working C# code, not just the regex:

    Console.WriteLine(
        Regex.Replace(
            "HelloWORld", 
            "(?<!^)(?<wordstart>[A-Z]{1,2})", 
            " ${wordstart}", RegexOptions.Compiled));
    

    And it prints:

    Hello WO Rld
    

    Update

    To make this more UNICODE/international aware, consider replacing [A-Z] by \p{Lt} (meaning a UNICODE code point that represents a Letter in uppercase). The result for the current input would the same. So here is a slightly more compelling example:

    Console.WriteLine(Regex.Replace(
                @"ÉclaireürfØÑJßå",
                @"(?<!^)(?<wordstart>\p{Lu}{1,2})", 
                @" ${wordstart}",
                RegexOptions.Compiled));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

rather than using a textnode to show content im trying to figure out how
Rather than just grabbing the user's friends' emails, I want to show their list
Rather than have a NULL in a column, I want a 0 to be
I start with describing the problem itself. Rather than a problem I'm looking for
Rather than use another widget I want to code the method to include the
Rather than having a bunch of links that are all different sizes, I want
Rather than have to upload/copy across each individual image in my table, I want
Rather than exposing the system generated meta data I'd like to provide my meta
Rather than using images, I was wondering if anyone knows how to make small
rather than using a jquery plugin. if i have two fields and the first

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.