I have a RegEx search script that captures variables from a 6-Tab variable. I need to expand it to capture variables for up to 8 tabs. How can I write the RegEx so it works for either 6 OR 8-tab text objects?
This shows the result of searching a 6-tab chart. Obviously just adding tabs to the RegEx does not work. I would simply add additional blank tabs to the "template files" these are pulled from but there are more than 100 charts. There's probably a better way.
I've done almost exactly this technique with no problem if the regex is searching for more delimiters than are actually there. It simply doesn't update the variables corresponding to the remaining (unfound) capture groups. Does that not work for you?
Also, have you tried just setting the 8 tab action to not cancel on failure? That way, if there are 8, the first one will load 6, but the second one will reload all 8. If, on the other hand, there are only six, then the first will load those 6, and the second will just fail and proceed to the next action.
By the bye, for others out there, this technique would work for any number of alternatives, as long as you order the regex actions from shorter to longer, as the 6-tab action before the 8-tab action in this example. All of the alternatives after the first (shortest) should be set to NOT cancel on failure.