naga ch
12th May 2016, 12:27
hello all,
can anyone help me how to split a string in erp ln by using scripting?
for example mail id is : xyz@gmail.com ,i want to split that mail id to gmail only
Regards
Naga
bdittmar
12th May 2016, 13:08
hello all,
can anyone help me how to split a string in erp ln by using scripting?
for example mail id is : xyz@gmail.com ,i want to split that mail id to gmail only
Regards
Naga
Hello,
by using string.scan or POS functions .
Example:
ret = string.scan(mailadress, "%s@%s.%s",user,maildomain,part)
ret = string.scan(tccom140.info, "%s@%s.%s",user,maildomain,part)
or
Pos to character "@" and next characters to "."
Regards
Ajesh
12th May 2016, 13:49
Hello there
Assuming that you know what position the term "gmail" would occur in your string
What you can do is
string input,output
input = "xyz@gmail.com"
output = input(5;5)
string(starting position from which you want to extract the data,the number of characters till you want to extract the data)
bdittmar
12th May 2016, 13:59
Hello,
this solution only works for Domain "gmail" with the given length.
Whats abaut .
harry.miller@gmail.com ?
Not dynamic, conversation Fails.
This solution produces : y.mil
Regards
naga ch
12th May 2016, 17:14
Hello,
by using string.scan or POS functions .
Example:
ret = string.scan(mailadress, "%s@%s.%s",user,maildomain,part)
ret = string.scan(tccom140.info, "%s@%s.%s",user,maildomain,part)
or
Pos to character "@" and next characters to "."
Regards
thank you bdittmar,
its working fine with string.scan function
regards
naga