Hi all,
I have an email address "shelon1986"<shelon0619@xyz.com>. How to remove""shelon1986" and get only "shelon0501@xyz.com" as output.
Hi all,
I have an email address "shelon1986"<shelon0619@xyz.com>. How to remove""shelon1986" and get only "shelon0501@xyz.com" as output.
0人中0人がこの記事が役に立ったと言っています
コメント
4件のコメント
Hi Sara,
Here is some C# example you can use to retrieve only values between "<" and ">":
string st = "\"shelon1986\"<shelon0619@xyz.com>";
int from = st.IndexOf("<") + 1;
int to = st.LastIndexOf(">");
st = st.Substring(from, to - from);
It will work if you create warning script rule on your field and add these lines of code. Instead of "st" use: Context.Field("ReplaceWithYourFieldName").Text;
Best regards,
Vladimir
Hi,
Just to add code you will use in script rule, to make it easier for you:
string st = Context.Field("ReplaceWithYourFieldName").Text;
int from = st.IndexOf("<") + 1;
int to = st.LastIndexOf(">");
Context.Field("ReplaceWithYourFieldName").Text = st.Substring(from, to - from);
Best regards,
Vladimir
Thank you Mr. Vladimir..! I did as you said and It works fine. Thank you very much
Hi Sara,
You're most welcome! I'm glad I helped.
Best regards,
Vladimir
サインインしてコメントを残してください。