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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:20:31+00:00 2026-05-19T03:20:31+00:00

I have tried to use the following regex expression to remove html whitespace and

  • 0

I have tried to use the following regex expression to remove html whitespace and leading whitespace

Find:   \s*([<>])\s*

Replace: $1

But each time that I do this I end up with 186 occurrences of $1 literaly in my document. Any assistance would be greatly appreciated

Here is an example of what I am talking about

This

<fieldset id="prod_desc">
<p>Original AA </p>
<b>Features:</b> 
<ul>
  <li>2 pole rectangular dome tent with 13.4 sq ft of vestibule storage </li>
  <li>Durable, shockcorded, self-supporting fiberglass frame and ring and pin/pole pocket assembly </li>
  <li>2 side opening door panels are constructed entirely of no see-um mesh to maximize air flow inside </li>
  <li>Poke-out vent in side wall allows the option of additional ventilation when needed </li>
  <li>2 interior storage pockets keep essential items handy Specifications: </li>
  <li>Season: 3 </li>
  <li>Sleeps: 2 </li>
  <li>Doors: 2 </li>
  <li>Windows: 2 </li>
  <li>Weight: 5 lbs 12 oz </li>
  <li>Area: 36.5 Sq. Ft. </li>
  <li>Center Height: 3' 7.5&quot;</li>
</ul>
</fieldset> 

should become:

<fieldset id="prod_desc"><p>Original AA</p><b>Features:</b><ul><li>2 pole rectangular dome tent with 13.4 sq ft of vestibule storage</li><li>Durable, shockcorded, self-supporting fiberglass frame and ring and pin/pole pocket assembly</li><li>2 side opening door panels are constructed entirely of no see-um mesh to maximize air flow inside</li><li>Poke-out vent in side wall allows the option of additional ventilation when needed</li><li>2 interior storage pockets keep essential items handy Specifications:</li><li>Season: 3</li><li>Sleeps: 2</li><li>Doors: 2</li><li>Windows: 2</li><li>Weight: 5 lbs 12 oz</li><li>Area: 36.5 Sq. Ft.</li><li>Center Height: 3' 7.5&quot;</li></ul></fieldset>
  • 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-19T03:20:32+00:00Added an answer on May 19, 2026 at 3:20 am

    Notepad++ doesn’t support $1 for backreferences before version 6.0 when it introduced PCRE support for find-and-replace. For older versions, use \1 for backreferences.

    You should be finding \s*(<[^>]+>)\s*. As of Notepad++ version 6.0, released in March 2012, this alone should work for you. I tried your original regex and it works as well, much to my surprise.

    Previous versions cannot do multi-line regex replacements. To strip newlines, perform the regex replacement first, then do an extended find (UNIX line endings):

    \n
    

    For Windows line endings:

    \r\n
    

    Replace either case with nothing.

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

Sidebar

Related Questions

I want to use regex in ng-repeat. I have tried the following code but
We have been using the following js/regex to find and replace all non-alphanumeric characters
I have tried to use the Notepad++ Search/Replace with a Regular Expression to replace
I have tried to use the following snippet of code: int main() { string
If I have the following data: test1.test2 AND test1.test2 What regex can I use
What regex/pattern can I use to find the following pattern in a string? #nnnn:
I have tried to use the following code to retrieve the data from the
I'm getting the following message for some php I have to use but did
I have tried to use mysql fulltext search in my intranet. I wanted to
I have heard about JNI and have tried to use it. What I would

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.