Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subs before a point
Message
From
15/01/2014 04:57:30
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01591879
Message ID:
01591899
Views:
46
>>I am trying to extract the characters BEFORE the @ in an email - is there a single line or simple two step code that can do this?
>>example
>>name_of_sender@thisemail.com
>>
>>I would like only the "name_of_sender"
>>
>>I know the long way round - searching for the '@' by counting characters in a for - endfor loop
>>perhaps a len() that counts to the @ - something along those lines.
>>
>>thanks
>>k
>
> GETWORDNUM(var, 1, "@")

I was wondering why this thread fell into the typical behavior of going for at(), atc() and manual string chopping, when we have all the functions like justext(), justfname(), getwordnum(), strextract(), alines() - all the better knives for this kind of slicing.

I guess it's because these functions are too new and people haven't found the time to get used to them. And some of them have been in that limbo called foxtools.dll (aka fpath in FPD) until V6, and the news of them becoming full-fledged members of the Fox proper haven't still reached the remoter villages...

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform