07-12-2007 7:26 AM
Say there is variable = 'abc@rediffmail.com'.
Everytime I want to retrieve @rediffmail.com from this string for validation .
One method is : I have used SPLIT at '@' but at that case in second variable I will get rediffmail.com instead of @rediffmail.com.
This method is ok . but can you suggest some other method.
07-12-2007 7:37 AM
Hi,
The above is the best method to use. Without a delimiter you cannot identify what substring to fetch.
Using the above method, split on '@' get the substring and concatenate '@' again to get the desired substring.
Regards,
Vinodh.
07-12-2007 7:41 AM
HI
Find the number of characters before the @.
then
string_value = variable+i(15).
where I is the number of character before @.
Please reward points for all helpfull answers
07-12-2007 7:44 AM
Your method is the efficient way to retrieve the last word.
Split the string at '@' and then if you need to have '@' within your string, CONCATENATE it.
Regards,
pavan.
07-12-2007 8:12 AM