Part of a text...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All.

I was wondering if there was a way to get the end part of a text after a
cretain character.

EX: I have this saved in my DB for a linked photo C:\mypics\Old\0001.jpg

There are many different folders the pictures are in and different lenght
filenames, so I could end up with something like this: (
C:\mypics\Old\0001.jpg) and (C:\pics\New\MyNewCar.jpg).

When I run a report, i would only like the part after the last \ to show
(0001.jpg) and (MynewCar.jpg).

TIA,
Joel
 
Thanks for they very quick responce Ofer, it worked great.

Could you explain exactly how it works? (if its not too much trouble)

Thanks Again,
Joel
 
The function instrRev return the location of the last "\" in the string
The mid function return the string from a certain position forward

So the combination of the two, will return the string to the right of the
last "\"

mid(Path,instrRev(Path,"\")+1)
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck
 
Thank you much =)

Ofer said:
The function instrRev return the location of the last "\" in the string
The mid function return the string from a certain position forward

So the combination of the two, will return the string to the right of the
last "\"

mid(Path,instrRev(Path,"\")+1)
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck
 
Back
Top