Link to home
Start Free TrialLog in
Avatar of Westside2004
Westside2004Flag for United States of America

asked on

Stripping Characters, mid(), left() ???

Hi,

was wondering, how can I strip part of this string so I am left with the following

Current String: R:\documents\userA\myfile.doc

I want to strip off the R:\documents\ and leave: userA\myfile.doc

Any idea how to do this?

I tried:

<cfset StrippedPath = #left(key,11)#>  In this example key is equal to :  R:\documents\userA\myfile.doc
<cfoutput>#StrippedPath#</cfoutput>

That basically left me with R:\documents\

This is what I want removed, but I want to be able to <cfoutput> what is left AFTER removing R:\documents\

which would be :  userA\myfile.doc

Can anyone help?  The first part of my path is set in stone :  R:\documents\ so I can only work with that, I thought about trying to use right() function, but the right part of my path varies in length, the only set part of the path I can remove is the R:\documents\

Thanks...

-WestSide
SOLUTION
Avatar of pinaldave
pinaldave
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Westside2004

ASKER

Thanks.

That did it... appreciate it...

Both answers are correct...

-WestSide
Well Gald to help you,
It is fun!
Regards,
---Pinal