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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:11:33+00:00 2026-05-27T08:11:33+00:00

I want to transform this a b b into this a b b number

  • 0

I want to transform this

a

b


b

into this

a
b
b

number of empty lines is variable and can be pretty huge. Empty lines contains spaces. I want to use a regexp like \r\n( *\r\n)+, but notepad++ seems not to like those special characters in regexp, tryed also \\r\\n( *\\r\\n)+

Please note that empty lines may contain spaces, so the correct regexp would be something like \\r\\n( *\\r\\n)+

  • 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-27T08:11:33+00:00Added an answer on May 27, 2026 at 8:11 am

    You can do ‘replace all’ multiple times on

    \r\n\r\n -> \r\n
    

    That’s with ‘Extended’ option selected, not ‘Regular expression’.

    If the empty line contains spaces, then first replace all lines with only spaces with nothing using regex: ^\s+$ -> ''. Then to the extended replacement above.

    Alternatively:

    You can also replace all \r\n with some sequence of characters that doesn’t exists in the document, e.g. ### then use the following regex replacement : '###(\s*###)+' -> '###' and finally replace back the sequence (‘###’) with \r\n.

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

Sidebar

Related Questions

Given the following sequence: normal %(b)BOLD% normal I want to transform this into the
I want to transform an XML document. The source XML looks like this: <svc:ElementList>
I want to transform a List[Option[T]] into a Option[List[T]] . The signature type of
I have a datetime column in db that I want to transform into a
I want to transform a line that looks like this: any text #any text#
I want to make a rule that transform this URL: http://www.example.com/product.php?category=1&product=5 Into http://www.example.com/brother-2035 (The
How do I transform this IEnumerable<KeyValuePair<MyType, IEnumerable<OtherType>>> into new sequence of the same type,
How can I make a XSLT to transform this: <root> <element>This <element>is</element> </element> <element>normal!</element>
I have a function where I want to transform a list of floats into
I'm trying to use uTorrent webUI API. I think this is a pretty n00b

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.