String manipulation

I have a string that has a network path along with a filename assigned to it.

I need the filename stripped from the string

I am trying to get everything from the right of 'Image\' but I figured Id post it as well

Thats it!!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jknj72Author Commented:
I need it in VB now....The last one was an Oracle question
if your vb is talking to an oracle database, you can still use the original answer

but syntax might look something like this...

right(your_string, your_string.length - instrrev(your_string,'\'))
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

slightwv (䄆 Netminder) Commented:
Back in the day, I picked up a function.  Not sure if I borrowed it off the internet (probably where I got it) or from some other source:

	Function GetLastRightOf(LookFor as String, myString as String) as String
		Dim StrPos as Integer
		StrPos = myString.LastIndexOf(LookFor)
		Return myString.SubString(StrPos + 1)
	End Function

Open in new window

Then you would just call:
jknj72Author Commented:
I actually  got it using

Mid(url, url.LastIndexOf("\") + 2)

I would have given you points but it didnt work..

Thanks anyway sdstub

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

 I put the '\'  in single quotes
it should have been double quotes "\"

There are methods for this specific case, why not use them?
jknj72Author Commented:
Haha that should have been what I was looking for Will. A little late though. Thanks
Mel-Leo RosalCommented:
Dim strTemp() As String
Dim sANSWER As String
Dim strInput As String = "\\dev01\company011\_fileserver\content\Image\VCSJK_1bd00b4f-c26e-4d01-84c6-d0848aa258d5_concert.jpg"

strTemp = Split(strInput, "\")
sANSWER = strTemp(UBound(strTemp))


Open in new window

jknj72Author Commented:
i figured it out but thanks anyway
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.