leo2012 Posted February 4, 2016 at 03:50 AM Report Share #593081 Posted February 4, 2016 at 03:50 AM Boas, Estou com uma dúvida de como remover todos os caracteres anteriores ao arroba (@) antes de um e-mail, fazendo ficar só o que tem depois. Ex: entrada: teste@gmail.com saída: gmail.com Link to comment Share on other sites More sharing options...
tiago.f Posted February 4, 2016 at 09:27 AM Report Share #593086 Posted February 4, 2016 at 09:27 AM 1º - Descobre a posição/index do caracter '@' (em vba podes usar InStr, em vb.net nao sei) 2º - faz um substring dessa posição até ao final (em vba podes usar Mid, em vb-net nao sei) Link to comment Share on other sites More sharing options...
Solution ribeiro55 Posted February 4, 2016 at 11:05 AM Solution Report Share #593099 Posted February 4, 2016 at 11:05 AM a_tua_string.Substring(a_tua_string.IndexOf("@")+1) Também podes optar por um split, se forem sempre emails: a_tua_string.Split("@")(1) 1 Report Sérgio Ribeiro "Great coders aren't born. They're compiled and released""Expert coders do not need a keyboard. They just throw magnets at the RAM chips" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now