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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:50:34+00:00 2026-06-09T16:50:34+00:00

I have tried to use the Notepad++ Search/Replace with a Regular Expression to replace

  • 0

I have tried to use the Notepad++ Search/Replace with a Regular Expression to replace specific words with shorter versions of those words.


I used the following regex to match every word that ends with er (but not er as a word) – and replace the matching words with the same words minus the ending r, using a backreference:

Find what: ([a-zA-z]+e)r

Replace with: $1

But it doesn’t replace the matching words, even though it finds them.

However, if I change the backreference syntax to this:

Replace with: \1

Everything works fine.


Why doesn’t the $1 backreference work?

What is the difference between the two forms of the backrefernce – \1 and $1?

  • 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-09T16:50:36+00:00Added an answer on June 9, 2026 at 4:50 pm

    Notepad++’s earlier versions (v5.9.8 and prior) only supported standard POSIX Regular Expressions. However, full PCRE (Perl Compatible Regular Expression) Search/Replace support was added in version 6.0:

    New features and enhancement in Notepad++ 6.0:

    • PCRE (Perl Compatible Regular Expressions) is supported.

    This means that if you’re using Notepad++ v6.0 or any newer version (e.g v6.1.5), you can use the PCRE syntax, and use $1 instead of \1 for backreference, but it won’t be compatible with earlier versions of Notepad++ (prior to version 6.0). Other than that, they’re similar.

    For more info regarding the differences between the backreference syntax and the reasons behind the new syntax support, see Backreferences syntax in replacement strings (why dollar sign?).

    A useful tutorial on how to use regular expressions in Notepad++ can be found here.

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

Sidebar

Related Questions

I have tried to use the following regex expression to remove html whitespace and
I have tried to use mysql fulltext search in my intranet. I wanted to
I have tried to use the following snippet of code: int main() { string
I have tried to use properties file to read properties to set those values
I have tried to use the following code to passing value back from the
I have tried to use the following code to retrieve the data from the
As the title says ... I have tried to use the following code to
I have heard about JNI and have tried to use it. What I would
Have you tried to use SharePoint with version control such as Perforce (or Subversion),
I use maven 3.0.3 and have tried to generate pom for third-party jar like

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.