MicroDread
New member
Hi there! I created a Macro that reads out information parsed from a JSON request to a website. It works as expected, except for one Action that I can't seem to get to work. I'm trying to get it to replace leading zeros in an HH:MM:SS time with the word "oh" only where the leading zero isn't in the hour. For example, "09 15 01" becomes "9 15 oh 1". According to Regex 101 the bolded expression works to identify only the desired leading zero: \d\d.(0)]\d
Here's a screenshot:
When MD implements this expression, it works right up until the replacement, but the rest of the numbers are lost, as if it's just replacing everything described in the regex expression, not just replacing the capturing group. So the above example becomes "09 oh". I can't tell how MacroDroid is replacing strings from any of the support docs I can find. How can I get the Text Manipulation Action to only replace the string captured by the expression, and not the entire expression?
Here's a screenshot:
When MD implements this expression, it works right up until the replacement, but the rest of the numbers are lost, as if it's just replacing everything described in the regex expression, not just replacing the capturing group. So the above example becomes "09 oh". I can't tell how MacroDroid is replacing strings from any of the support docs I can find. How can I get the Text Manipulation Action to only replace the string captured by the expression, and not the entire expression?