Experts Exchange connects you with the people and services you need so you can get back to work.
str = "NLU97PF0LO0Q6ZHL0IZZHIZAXALYLD6RU"
desired = "NLU97PF0-LO0Q-6ZHL-0IZZ-HIZAXALYLD6RU"
position1 = 8
position2 = 12
position3 = 16
position4 = 20
newStr = Left(str,position1) & "-" & Mid(str,position1+1,4) & "-" & Mid(str,position2+1,4) & "-" & Mid(str,position3+1,4) & "-" & Mid(str,position4+1)
response.write(desired & "<br/>")
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Your question, your audience. Choose who sees your identity—and your question—with question security.