[Robelle-l] question about string replacement in text line

Neil Armstrong neil@robelle.com
Tue, 27 Jul 2004 17:18:40 -0400


At 09:41 AM 7/27/2004, John Ma wrote:
Dear John,

It is doable, but requires a more recent version of Suprtool. Here is some 
sample
code that may help, I am going to assume that the extract is from a 
database called
data and a dataset called students, and that you are extracting to a file 
and that the
data is kept in a field called emailadd which is defined as x40.

run suprtool.pub.robelle
base data
get students
def newmail,1,40,byte
ext newmail = $split(emailadd,first,"@") + $split(emailadd,"@",last)
out address,link
xeq

So primarily this centers around using the $split function. For details 
please see
the latest change notice at:

http://www.robelle.com/ftp/manuals/suprchg.pdf

and look for details on the $split function. This feature was added in 
Suprtool 4.6.03, I think,
as I am doing some of this from memory. :)

Hope this helps.

Sincerely,


Neil Armstrong
Robelle

>Hello,
>
>New to suprtool , still need to learn it.
>
>Does anybody know how to replace a substring within one single line?My 
>client ask me to provide username from user email address without 
>@....  information.
>
>For example,   <mailto:yma@wooster.edu>yma@wooster.edu is email address, 
>my client need only user name "yma"  without "@wooster.edu"
>
>Any hint?
>
>John Ma
>
>The College of Wooster
>