MJ
asked on
How to standardize Token in a string by making upper case and removing all spaces?
If I have a token in a string but I want to ensure it is only upper case and contains no spaces, how would I do this? Only the token will have the square brackets in the string.
Input Examples:
1) ?n1=v1&n2= [new vs returning]&n3=v3
2) [New vs Returning]&n3=v3
3 [ NEW VS retur nin g ]&n3=v3
4) ?n1=v1&n2= [current url]&n3=v3
5) ?n1=v1&n2= [ CurRent uR l ]&n3=v3
Output Examples:
1) ?n1=v1&n2=[NEWVSRETURNING] &n3=v3
2) ?n1=v1&n2=[NEWVSRETURNING] &n3=v3
3) ?n1=v1&n2=[NEWVSRETURNING] &n3=v3
4) ?n1=v1&n2=[CURRENTURL]&n3= v3
5) ?n1=v1&n2=[CURRENTURL]&n3= v3
Thanks!
Input Examples:
1) ?n1=v1&n2= [new vs returning]&n3=v3
2) [New vs Returning]&n3=v3
3 [ NEW VS retur nin g ]&n3=v3
4) ?n1=v1&n2= [current url]&n3=v3
5) ?n1=v1&n2= [ CurRent uR l ]&n3=v3
Output Examples:
1) ?n1=v1&n2=[NEWVSRETURNING]
2) ?n1=v1&n2=[NEWVSRETURNING]
3) ?n1=v1&n2=[NEWVSRETURNING]
4) ?n1=v1&n2=[CURRENTURL]&n3=
5) ?n1=v1&n2=[CURRENTURL]&n3=
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry my mistake! Thanks!
ASKER
Thanks again!
ASKER
This doesn't seem to be working for me?