Given a URL, I want to be able to get the number of characters (s if non digit character and d for digit character) after each special character. For example, for a URL like this:
url="https://imag9045.pexels1.pre45p.com/photos/414612/pexels-photo-414612.jpeg"
I want the output to be: '4s.4d.6s.1d.4s.2d.com/6s/6d/6s-5s-6d.'
The code I have below only generates the desired result before the domain (before '.com'). I am having issues generating the rest.
How can I manipulate it to get the desired output (`'4s.4d.6s.1d.4s.2d.com/6s/6d/6s-5s-6d.'`)?