I suggest adding a definition for your user attributes, especially if sharing with others. Names are not always as indicative—or memorable—as we assume when making them. For instance, the meaning of $Vol isn’t guessable.
Of course, if I had the RepCount app (I don’t) I might know.
. In that vein, why not—in your shared demo—add a note that holds un-parsed data. That way more people can try out and (learn from) your code even if their own task is different.
$bodypart doesn’t appear to be used. Your ‘Future Work’ note hint at this “…e.g., Matrix Lat Raise = Shoulders, …” where i’m guessing "shoulders might be the $bodypart value.
None of the above are errors/bad practice, just odd things noticed when perusing the code. Kudos to you for sharing and for getting as far as you have. the slope seems steepest at the start. The more pre-existing structure you have, things get a bit easier.
A couple more minor observations from stamp “Process Repcount”
//create Startdate from first line of Text
Attribute names are case sensitive. A good habit to acquire—whatever your personal attribute naming strategy is to use the correct casing of the attribute you are describing. Checking further down the code, the comment actually refers to StartDate
not Startdate
(the latter would be a different attribute). Now, while the code is fresh in mind, that might seem a snippy observation but it draws on experience. Months from now, you might be chasing a glitch which turns out to be a mis-named (mis-cased!) attribute reference. i’ve certainly done that in the past.
Again for future self, it might be useful to comment what your regex are ding. the first seem to look for aline starting with a single letter character (upper OR lower case) followed by zero-or more of any character. The next seems to look for a line containing (should that be starting with?) one or more successive digit characters, zero or more white space, a single ‘x’, zero or more white spaces then one of more digits.
As said these are minor things (but you asked
). Overall it looks good. Well done!