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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:34:42+00:00 2026-05-13T18:34:42+00:00

I have a part of HTML source file that contains strings that I want

  • 0

I have a part of HTML source file that contains strings that I want to select and copy at once, using the regex functionality of Notepad++.

Here is a part of the text source:

<option value="Performance"
>Performance</option>
<option value="Maintenance"
>Maintenance</option>
<option value="System Stability"
>System Stability</option>

I’m using the regex "[0-9a-zA-Z ]*" to search the “value” values. I have also selected the feature in Notepad++ search to highlight/mark the found text. This working fine I now want to copy or cut only the highlighted text to clipboard for further processing. But I’m not able to find this functionality in Notepad++. Is this simply not possible or am I too dumb?

  • 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-13T18:34:42+00:00Added an answer on May 13, 2026 at 6:34 pm

    Try this instead:

    First, fix the line ending problem:
    (Notepad++ doesn’t allow multi-line regular expressions)

    Search [Extended Mode]: \r\n> (Or your own system’s line endings)

    Replace: >

    then

    Search [Regex Mode]: <option[^>]+value="([^"]+)"[^>]*>.*

    (if you want all occurences of value rather than just the options, simple remove the leading option)

    Replace: \1

    Explanation of the second regular expression:

    <option[^>]+     Find a < followed by "option" followed by 
                     at least one character which is not a >
    
    value="          Find the string value="
    
    ([^"]+)          Find one or more characters which are not a " and save them
                     to group \1
    
    "[^>]*>.*        Find a " followed by zero or more non-'>' characters
                     followed by a > followed by zero or more characters.
    

    Yes, it’s parsing HTML with a regex — these warnings apply — check the output carefully.

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

Sidebar

Related Questions

I have a form that I don't render as part of HTML page but
I have HTML that I need to extract a part number from, the HTML
I have Javascript function defined in the main index.html file. One part of this
I have a web page. The HTML source contains this text: <meta property=og:title content=John/>
I have a function to load a html part into a element in main
I have read this in order to compile NH spatial for Nhibernate 3.1 http://build-failed.blogspot.it/2012/02/nhibernate-spatial-part-2.html
I am getting a strange behavior for multi-part form. I have a simple HTML
I have part of my script that goes like this: while read line do
I have two questions: While editing a source file, it's very convenient to be
I have a SharePoint web part that I wrote in C# which is used

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.