• Login
Community
  • Login

RegEx This but not that

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
regex
3 Posts 2 Posters 129 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    Robert Or Janet Diebel
    last edited by Mar 3, 2025, 10:09 PM

    I wish to search text for all two character words, and then eliminate “mu, ku, ha, ou”

    {space}[a-zA-Z][a-zA-Z]{space} works to find all.
    How do I get rid of the above ones

    M 1 Reply Last reply Mar 3, 2025, 10:50 PM Reply Quote 0
    • M
      Mark Olson @Robert Or Janet Diebel
      last edited by Mark Olson Mar 3, 2025, 10:51 PM Mar 3, 2025, 10:50 PM

      @Robert-Or-Janet-Diebel
      Try (?-i)\b(?!mu|ku|ha|ou)[a-zA-Z]{2}\b (replace the \b with \s+ if you want to match surrounding space too)

      R 1 Reply Last reply Mar 4, 2025, 3:50 PM Reply Quote 5
      • R
        Robert Or Janet Diebel @Mark Olson
        last edited by Mar 4, 2025, 3:50 PM

        @Mark-Olson Thanx. Your time and effort is much appreciated

        1 Reply Last reply Reply Quote 0
        2 out of 3
        • First post
          2/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors