Regex – no me funciona v14 a v15 macro-

User-to-User discussion about the PhraseExpress macro programming.
Post Reply
Nelsao
Posts: 19
Joined: 04 Jan 21, 05:01

Regex – no me funciona v14 a v15 macro-

Post by Nelsao » 15 Aug 21, 21:53

Hi, I have a macro to open a normal document with (emb). It works perfect. Likewise, I have activated the folder (last used) assigned with the autotext (g).
I have a macro (open file) that worked in version 14, but NOT in version 15: it is a macro that applies “regex” to extract the path of the last file used with embed. I use like this:
1 \ {#open {#regexget -text {#insert g} -expr [C:]. + (. Docx | .doc | .pdf | .xlsx | .xls)}}
a) {#insert g} (allows me to select the file from last used folder)
b) {#regexget -text {#insert g} -expr [C:]. + (. docx | .doc | .pdf | .xlsx | .xls)} = apply regex to the document (last used “g”) that i selected
c) {#open = finally open the document with, because thanks to regex the path was extracted.

The problem in version 15 is that instead of executing the regex, the macro (embed) is executed. For me this is a problem that affects my workflow because I have many documents and many times I need to modify something in the template, so things are, if I need to update something in the template in version 15 I would have to be looking in the folders to find The document. This modifies me a lot and takes time away, because thanks to the macro that worked in version 14 I could do everything very quickly and it would open the document.

I also have many other macros of that style:
1) Open manually selected document from a folder where it is hosted with regex
2) extract url from open web page with regex

This macro is useful to me because in my workflow I have to insert several documents (I have almost 300 Word documents with "embed") and from time to time I have to modify.

NELSON DAVID CARVAJAL ALCARAZ
attorney
You do not have the required permissions to view the files attached to this post.

Technical Support
Posts: 2892
Joined: 10 Feb 06, 22:23

Post by Technical Support » 16 Aug 21, 11:48

This is actually very strange, that it worked before and it is definitely not supposed to work this way. If the path must be variable and you want to use it in multiple places, then save it to a temporary variable or in a separate phrase (if you want to preserve it after restart) and retrieve as needed.

Nelsao
Posts: 19
Joined: 04 Jan 21, 05:01

Post by Nelsao » 17 Aug 21, 00:24

Well haha 🙈🙈 I'll try another way, but I was initially surprised that it worked. I think experimenting occurred to me and it just worked. But I will try to save the path and then execute "open document" and "embed" taking the path of the folders that contain them, Thank you very much! For the idea. I take this opportunity to congratulate you on the excellent program you have. I have been a paying user for three (3) years, but I have been using Pharase Express since 2012 and will continue to be. ♥ ️

Post Reply