The Regular Expression "r\d{1,2}" will match the character r and any digit after that (but for a count in between 1 and 2 (\d{1,2}) and replace them by p0
What if there is "r" with more than 2 numbers after it (e.i. r463718/r3/4/r5)?
Is there a way to get the same result no matter the amount of numbers after the "r"
Is there something more elegant than ("r\d{1,9999}","p0" ) ?
Or would that even work the way I think it would.
You could do something a bit simpler in this case without regex!
You could likely just do Repeat(“p0/“, column.split(“/“).count())
All that is doing is counting how many “r/“ things you have regardless of the number of digits after the r and then repeating your p0 string a matching number of times