I've been cracking my head for half day and researching regexp to solve below problem with no avail, so hope you can help me.
I have bellow string that is separated by "//" between parts (can also be additional random "/" inserted anywhere). The string end always has from 0 to 10 slashes. The tricky part is to remove the last remaining slashes "//+" without removing double slash "//" between text.
Example1 slash ending:
strEmail = "TT44 4 x VCK TTT30 FAX//IT/40170539/CA1211 dd 15.08.12//E1333/City/TS///LC30//75735/01364//---//548657,14-E2424-//34-1/ss//Customer1//LINE1//75739/00096//---//////"
Example2 no slash ending:
strEmail = "TT44 4 x VCK TTT30 FAX//IT/40170539/CA1211 dd 15.08.12//E1333/City/TS///LC30//75735/01364//---//548657,14-E2424-//34-1/ss//Customer1//LINE1//75739/00096//---"
Slash count can be dynamic, but will always end from 0 to 10. I think there could be simple solution, without need of regexp. Something like: if after any slash there are no more Alphanumeric characters, remove text after Alphanumeric character.
thank you and regards