Re: Extracting the last word in a string
- From: "Ken Halter" <Ken_Halter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 6 Jan 2008 14:58:45 -0800
"robboll" <robboll@xxxxxxxxxxx> wrote in message
news:4dd5c8fa-de8d-46e3-b9de-8053a32836a9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
What is the best method of extracting the last word in a string?
Example Table/Field1:
Field1
There once was a time
The old man sat
Two peas in a pod
One bird in the hand
function to extract the last word:
FunResult
time
sat
pod
hand
If it were the first word it would be: mid(Field1,1,instr(1,field1,"
"))
Check out the InstrRev function... checks from the end of the string.
--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
In Loving Memory - http://www.vbsight.com/Remembrance.htm
.
- References:
- Extracting the last word in a string
- From: robboll
- Extracting the last word in a string
- Prev by Date: Extracting the last word in a string
- Previous by thread: Extracting the last word in a string
- Index(es):
Relevant Pages
|