NMS Posted February 7 Share Posted February 7 Hello. I've browsed the forums for a while however wasn't able to find exactly what I'm looking for. I have the following string as example with characters marked in bold as my desired match (full file path): test text "" HYPERLINK "A:\test\folder\1"[Folder] more test text - HYPERLINK "A:\test\folder\1\6-07-02-2023-13-52-46-1.png"6-07-02-2023-13-52-46-1.png This string has 2 hyperlinks with only one reffering to the actual file, while the other one points to the folder. The string can have only 1 full file path, however its placement can vary. This function is running inside the WM_NOTIFY message as I am getting the text that is currently under the mouse position so the less steps it takes to get the final link the better. Basically what I need is always in between HYPERLINK " and .png" $sLink = StringRegExpReplace($sText, '(HYPERLINK ")[\s\S]*?(?=png")', '$1') The above is best what I got and even that is far from the desired result. Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now