Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Trim URL from the right side.

Explorer ,
May 18, 2009 May 18, 2009

Hello all,

I am trying to trim the right side of a URL base on the first occurrence of "\".                      

Note: URL is a Verity search result.

The URL example: "C:\Inetpub\wwwroot\Conv_PDF\Files\facility \ facility_ur_plan.doc "

If I use           cfset tString = #right(#URL#,  20)#

I get the result of  "facility_ur_plan.doc"

What I would like to do is find the first " \ "starting from the right side and this use the result as the cut point of the Right function.

ex: cfset tString = #right(#URL#,  #cut#  )#

This would allow any length of a document name to be used.

Any ideas would help.

Thank you

TJ

TOPICS
Advanced techniques
712
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , May 18, 2009 May 18, 2009
<cfset tString = ListLast(urlString, "\")>

Mack

Translate
Enthusiast ,
May 18, 2009 May 18, 2009
<cfset tString = ListLast(urlString, "\")>

Mack

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 18, 2009 May 18, 2009
LATEST

Thanks Mack,

That did the trick !

TJ

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources