Jump to content
UBot Underground

REGEX - Last Word


Recommended Posts

I could use some help if possible.

 

I have a string: c:\user\thadude\directory\filename.ext

 

That's just an example string - It would change constantly.

 

What I am wanting is to use regex to remove everything except filename.ext

 

There is no constant in the string - it will change per use, and per user, and the extension will change as well.

 

Any help appreciated.

Link to post
Share on other sites

set(#current_file_name, $find regular expression(#setfile, "(?<=\\).*?$"), "Global")
 

UbotDev,thanks for the help man. - I tried it but it just leaves the var value empty.

 

The variable - setfile has the big full path... and the variable current_file_name should end up with just the file name and ext.

 

so c:\user\thadude\directory\filename.ext would become filename.ext

Link to post
Share on other sites

Thanks for your generosity, but it's OK, I'm happy to help if on the receiving end they are willing to learn ....so just keep learning. ;) If you still insist, I now have a donate button on my website.

Link to post
Share on other sites

uniquebot - trying to wrap my head around what you're saying... just not happening right now.... definitely time for food and a little rest, then i'll come back and re-read it.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...