Let's say I have a snippet (called snippet1) that I want to use at a later date.
I put a number of text strings that I want to eventually replace, but I won't have all the info available at the same time,
So I want to be able to run a called snippet2, which will bring up a form that I can fill and find/replace those text strings INSIDE the snippet1
Then on a subsequent day, (once I get the info to fill in the remaining fields) I wanna be able to run snippet2 inside snippet1 again to update the remaining strings.
Here's a practical example.
I wanna write an announcement for a community event. I would use these strings to find/replace:
What are you attempting to do with Google Docs? They can be used anywhere you want to trigger a URL so if there is a Google Docs URL you want to trigger you should be able to use them there.
Note we are working on developing integrations with the Google API's (like the Sheets or Docs API) that would allow many more possibilities. I would love to hear about the different use cases you or others have for these types of integrations.
It's a very specific scenario and pretty hard to explain in writing because I would have to show you multiple examples. If you want, we can jump on a Skype call and I can use screen sharing to walk you through the whole process. It could actually make for a very interesting case study for the community too actually.
So, after our exhange, I tried to apply the extractregex function in Text Blaze. But I'm faced with a little problem.
I'm using this:
{formtext: name=URL}
{urlload:{=URL}; done=(res) -> [
"date"=extractregex(res, "Date: (\w+)"),
"time"=extractregex(res, "Time: (\w+)")
]}
Form result after loading:
Found field 1: **{=Date}**
Found field 2: **{=Time}**
Something like the following should work. The []'s mean "match any character" in these brackets. So "[\w ]" means match any letter, number or space.
Since you might have other things such as commas, dashes, question marks, or periods; it's probably best to just use "." which will match any character except a newline.
{res="Date: datetest
Time: timetest1timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest timetest 1
Another line....."}
Date is {=extractregex(res, "Date: (\w+)")}
Time v1 is {=extractregex(res, "Time: ([\w ]+)")}
Time v2 is {=extractregex(res, "Time: (.+)")}
I'm not seeing the "\n\n" issue. If I edit the example I wrote above to include newlines as use [\s\S] it looks like everything is working correctly to me.
Could you post an example (your Google docs is accessible to me).