I have a text file with about 4000 lines of text in it. I need to search for the words "there" and "when". Ive tried a few regex type of things but they all do it wrong or dont get detected at all. So how would I search for those 2 words and it would show ALL the matches for both words?
Thanks in advance!
Using Regex to find and replace text in Notepad++ In all examples, use select Find and Replace (Ctrl + H) to replace all the matches with the desired string or (no string). And also ensure the 'Regular expression' radio button is set.
1.3, doing any of those keystrokes ( Ctrl+F , Ctrl+H , Ctrl+Shift+F , or Ctrl+M ) once would open the Find dialog or bring it into focus; from the main dialog, hitting Ctrl+F would re-center the dialog (no matter which tab of the dialog you were on); but you could not use the shortcuts for the other tabs to switch ...
FYI Notepad++ supports “PCRE” (i.e. PERL Compatible Regular Expressions) using Boost's RegEx library which is different from the PCRE and PCRE2 libraries.
Use this regex
(there|when)
and make sure you enabled the "regular expression" radio button.
You can also use
there|when
if you don't need to use references for search&replace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With