Community
    • Login

    Find number betwen commans

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 144 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.
    • Toze CerdeiraT
      Toze Cerdeira
      last edited by

      I have this file:

      [p2,115,0,4,] Steel Drums
      [p2,116,0,4,] Woodblock
      [p2,117,0,4,] Taiko
      [p2,119,10,4,] Sine Perc.
      [p2,118,0,4,] Melo. Tom 1
      [p2,118,18,4,] Jungle SD

      How to subtract “1” to the first value between comans

      ,115,
      ,116,
      ,117,
      ,118,
      ,118,
      etc

      Thanks

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Toze Cerdeira
        last edited by

        @Toze-Cerdeira

        You would have to script a solution to that.
        A similar discussion that would show you how to do it is HERE.

        In your case your “find” expression could be: p2,(\d+), and you could replace with 'p2,' + str(int(m.group(1)) - 1) + ',' or something close to that; there are a few different ways to write these expressions.

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