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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:31:10+00:00 2026-06-12T18:31:10+00:00

I‘ve got some text like this: prefix:hello1_Th2ere_a3nd_Ther4e and I want to change these text

  • 0

I‘ve got some text like this:

prefix:hello1_Th2ere_a3nd_Ther4e

and I want to change these text to:

prefix:Hello1Th2ereA3ndTher4e

and I am trying to run follow command:

:1,$s/prefix:\(\([a-z]\)\([a-zA-Z0-9]\+\)_\)\+\([a-z]\)\([a-zA-Z0-9]\+\)/???

then I have no idea how to fill “???”

We can refer to content in quote of regex by “\1\2” when the quote is unnested, But what to do when the quote is nested.

  • 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-12T18:31:11+00:00Added an answer on June 12, 2026 at 6:31 pm

    This is normally done by two nested substitutes:

    %s/\v(prefix\:)@<=%([a-zA-Z]%([a-zA-Z0-9]+)_)+[a-zA-Z][a-zA-Z0-9]+/\=substitute(substitute(submatch(0), '\v[^_]+', '\u\0', 'g'), '_', '', 'g')/
    

    Note that you regular expression does not match the example string: “T” in “Th2ere” and “Ther4e” does not match [a-z] hence I replaced it with [a-zA-Z].

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

Sidebar

Related Questions

Got something like this <div class=something> <div></div> <p> Some text here </p> </div> This
jsFiddle In this jsFiddle I've got two images and then some text. I want
I've got some html that looks like this: <div> <span class=red>red text</span> some more
I've got some code like this: <p>Lorem ipsum<a href=# class=a>link</a><span class=b>Text</span>More lorem ipsum<a href=#
I've got some XML (valid XHTML) that looks like this: <html> <head> <script type=text/javascript>
I have a file like this: my line - some words & text oh
I have, for example, markup like this <div id=content> <p>Here is some wonderful text,
I've got many files with variables in them like {$var1} some text {$var2} some
I've got some data sent via a server, formatted like this: [ {Username:user1@domain.com, id:1},
So I've got this control I'm trying to make. It's an in-place text editor

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.