Biks 9 Posted December 27, 2011 Report Share Posted December 27, 2011 I'm just trying to find a string to select the last half of a url. I want to trim off the text to the right of the last forward slash. I want this: http://user.domain.com/post/11735684801/this-is-a-post To turn into this http://user.domain.com/post/11735684801 The flow I want to achieve is - start at the end, select everything back to the first slash. What I've come up with is this: http://img84.imageshack.us/img84/7052/grepexample.jpg With \x2f.+.$ - it ignores all the slashes to the first one, why? What am I doing wrong? With [0123456789]\x2f.+.$ - I'm almost there, but I don't want the last number included. I've spent way too much time with Photoshop to get a deep understanding of this programming stuff! :-P Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.