Can anyone tell me how to remove unwanted characters from username field.
ex: i:0#.w|abcventures\sreekiran.k
I need to remove the characters which are generated before abcventures\sreekiran.k
.
I have used translate()
to eliminate those characters, but, it is removing i
& w
characters also, from the username.
To expand on the current answers, I think they meant to use substring-after(). This will do the trick:
substring-after(userName(), "i:0#.w|")