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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:36:40+00:00 2026-06-15T07:36:40+00:00

For example, there is a lot of lines like this: term – definition. As

  • 0

For example, there is a lot of lines like this: “term – definition”. As regular expressions in Notepad ++ can be done to the “term” was written in uppercase (capital) letters – TERM?

Thanks!

  • 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-15T07:36:42+00:00Added an answer on June 15, 2026 at 7:36 am
    Find what: ^(\S+)(?=\s*-)
    Replace with: \U$1
    

    What does this do? The search pattern matches as many non-space characters at the beginning of a line as possible (\S+) and captures them in variable $1 because of the parentheses. After that follows a lookahead that asserts that this “word” is followed by a hyphen (without anything else in between). This lookahead is not actually included in the match, so it won’t be removed/replaced.

    The replacement starts with \U which says “output everything after here in upper case unless you stop this with an \E“. Then $1 writes back what we matched with \S+ (in your case term). But in upper case.

    Make sure to update to Notepad++ 6. Before that regular expressions were a bit quirky.

    Here is the documentation of what’s possible in the replacement string.

    EDIT:

    I guess your actual lines might be a bit more interesting than just having one word at the beginning of the line and then the hyphen. But from your given example I can’t tell. But to do this for an arbitrary number of words and ignore whitespace at the beginning of the line (as long as there is an hyphen somewhere in the line), you could do something like this:

    Find what: ^(([ \t]*[^\s-]+)*)(?=[ \t]*-)
    

    But without actual input examples, I am afraid you have to figure out the proper search pattern yourself.

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

Sidebar

Related Questions

WebKit has a lot of pre-processor lines like this: #if MACRO1(MACRO2) For example: #if
I need to explain this by example: Is there a best practice or preference
The title sounds like there is a lot of problems ahead. Here's my specific
i have a plot looking like this: However the lines are overlapping quite a
First, I'd like to thank anyone who can help in advance, I haven't done
Is there any way I can enforce a method returning something along the lines
I see there are lot's of examples in Ext JS where instead of actually
There are a lot of examples on the internet of reading files but I
Lets say for example there are 5 records shown on screen. I want the
On the Groovy example page there is an example of how to use Groovy

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.