Community
    • Login

    Regex: Replace after I between tags

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 177 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.
    • Vasile CarausV
      Vasile Caraus
      last edited by

      I have this title, translated in Belarusian.

      <title>Divano | Я хачу паставіць</title>
      <title>America | ў пачатку радка</title>
      <title>America | сёння яны едуць у амерыку</title>

      I want to become:

      <title>Divano | My name (en)</title>
      <title>America | My name (en)</title>
      <title>America | My name (en)</title>

      This is the solution, maybe someone need it:

      Search: <title>.*\|\K(.*)(</title>)
      Replace by: \x20My name (en)\x20\2

      1 Reply Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn
        last edited by

        Probably we don’t need postings of random regex replacement solutions.

        1 Reply Last reply Reply Quote 1
        • Alan KilbornA
          Alan Kilborn
          last edited by

          Plus, it doesn’t work like you say anyway. :-(

          If you use literal ( or ) in your replace expression, you must escape them as \(, \) or they do not appear!

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