omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Trouble with looping regex replace workflow

    Editorial
    2
    3
    2249
    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.
    • aliteralmind
      aliteralmind last edited by aliteralmind

      Hello

      Very happy and long term user of Editorial.

      I have the following workflow and it’s not working. I am having trouble In the loop. I am reasonably confident about the replace But it is obviously not working. There is only one line of output being printed, and without the replacement occurring.

      I would greatly appreciate a bit of advice to push me over the hump. Especially advice on how to better debug this in the future.

      Thank you.

      My goal is to select a set of lines and replace it with an HTML list. If this is selected:

      A
      B
      C
      D
      E

      Then it would be replaced with:

      <ul>
      <li>A</li>
      <li>B</li>
      <li>C</li>
      <li>D</li>
      <li>E</li>
      </ul>

      editorial://add-workflow?workflow-data-b64=eNrNVm1v2jAQ_iuRtX0aY4V9i6ZWlG0qEisVSVtN64RMclCrjh3Zl5YK5b_vnJelgmpdEKP7gszd5bm7J4_vsmY8QqGVZf6PNUt5ZuEUFtrANFNKqCXzF1xa6JSua4G3OsPgVj-Q74IbngCCsb-josyiTkKBEpjPGBkkt-Rm19rcLaR-GBTZAqQMV9wIPqdAB94grZmiMz3CpZxJocBSwD2XGTgfPqaFL77nKoI4hBWSG_UdqClXSygA1kcdr5dT2FuIBaXyLUgoErOcgt0zPjtheZ53_tizzeaD12CHAM4uP2_xQrai37-koWn1XHvu5JU0QNz1hlwpjV5kgCN4UljsOmrizPCCJr_XYSIqDi-RtG9hpLVlq39b8VJjOj5qwINWOdSKdEWHLyrerDLPf_6rbFuERDohg7BahYUejjoMVqkBaym6314nTgINQK_9fWuubKt7tvfbM5BgcIuueYZIvFy1mSVNH9r1VEL06iImJgYDTgOVY0fszGE7eQ9dtDwtwJiPJqO-sUp2Fn4bF1eVgBJ6RXy5Q6aqYk8bL1O6_HPSdPbxCb2VZceWGsx-jXlZJ2SHnikvLxvX3IyUvxCr3dfNSKUZvqL0p5DSPHdo42pvboymA9byVaiY6pE82ubcVPbWorrBT1Icv-nR782HY8f0gtK0x-m-q5-dpOW-6x-WHG0SjgEal2GTHWyx4_9b7T27GQ9bjpNYUH3xVOQ9K8ME1L74ptVfzZOnw7r8kGLh94vRcHIevB-Mx7PxKAi7KXWf_wIh_RWW

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by omz

        There were a couple of minor problems with your workflow, e.g. the selected lines were not the input for the repeat block, the $1 capture group in your regex didn’t exist, and a few other things.

        This one should work:

        HTML List

        1 Reply Last reply Reply Quote 0
        • aliteralmind
          aliteralmind last edited by

          Very grateful. Thank you.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors