So I made something, assuming you'd want to use the format described in your latest post, with some edits. Instead of your format, I have modified it slightly to read as this: :PlayerPoints1.300]:PlayerPoints2[500]:PlayerPoints3[700]: Simply because it's the one I chose for testing, it takes time to account for all those extra spaces, plus having a spacer character at the beginning and the end makes things easier.
I assume you want the regex to: Be able to categorize the variable name, display the value stored in the variable, and then change the variable.
note that much of this is just for future reference.
-separate number from variable: Regex101 - online regex editor and debugger
(this code can be optimized, but it was intended for something else possibly later)
-cut off number from variable: Regex101 - online regex editor and debugger
-turn modified number into [add] regex and add to end of variable: Regex101 - online regex editor and debugger
This should accomplish most of the functionality, see if this is along the lines of what you wanted. If not please explain and I'll make the changes.
Q. Do you already have the regex for separating your variables so you can test one at a time? There are tons of ways to do it, my string parser being only one method.
Here's one I just thought up, I'm too tired to finish it tonight though... I thought of using a modified regex counter to change the $ command after the [with] to the next number up / down. Then using quite specific regEx you can have it select the next field and copy it into the input of a display shift register.
I assume you want the regex to: Be able to categorize the variable name, display the value stored in the variable, and then change the variable.
note that much of this is just for future reference.
-separate number from variable: Regex101 - online regex editor and debugger
(this code can be optimized, but it was intended for something else possibly later)
-cut off number from variable: Regex101 - online regex editor and debugger
-turn modified number into [add] regex and add to end of variable: Regex101 - online regex editor and debugger
This should accomplish most of the functionality, see if this is along the lines of what you wanted. If not please explain and I'll make the changes.
Q. Do you already have the regex for separating your variables so you can test one at a time? There are tons of ways to do it, my string parser being only one method.
Here's one I just thought up, I'm too tired to finish it tonight though... I thought of using a modified regex counter to change the $ command after the [with] to the next number up / down. Then using quite specific regEx you can have it select the next field and copy it into the input of a display shift register.
Attachments
-
2 KB Views: 1