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.


    RegEx Help

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

      Greetings all,

      Vittici shared this a long time ago. I'd like to modify it to select forward one word at a time instead of backward one step at a time. I've tried messing with it, but my knowledge of regular expressions is not up to snuff. Is there anyone who loves playing around with workflows and regex that would like to flip this workflow around for me? I imagine if I could follow it, it would be pretty simple to reverse. Alas, I can't. :-)

      Thanks!
      Dan

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

        This is a somewhat tricky workflow... but I think this does what you want:

        http://www.editorial-workflows.com/workflow/5901322377232384/fKLB82CyMa8

        It's not based on Federico's workflow because selecting backward is more complicated than forward, so there's a bunch of stuff that you don't really need... Brief explanation of how it works:

        • First, it extracts the text from the end of the selection to the end of the entire document (leaving the second part of the range empty implicitly uses the end of the document)
        • Then, there's the regular expression that finds the next word, including whitespace etc. that comes before it
        • The count action simply counts the number of characters that we have to move forward...
        • ...which is then used in the final Select Range action with inline math to add it to the end of the current selection.
        1 Reply Last reply Reply Quote 0
        • minnepicker
          minnepicker last edited by

          Saweet! Thanks again Ole!

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