Posted 13 years ago by Marianne
Avatar
Using the tutorial to get a hyperlink identified in string, it only seems to work if the hyperlink is at the very start of the string and not if it is anywhere in the middle. For example:

"http://www.somewhere.com" - works
"my url is http://www.somewhere.com" - does not work

I've tried using LookBehind values but nothing seems to have any effect.

------------------------------- Marianne

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marianne,

Remember that the parser is a greedy parser so once it starts matching a pattern it goes as far as it can with that pattern before quitting. Therefore if your pattern is matching all characters in a string without breaking, then it's not going to stop and look for an http:// start.

What you'll need to do is make your string state tokens break on each word. Then it should work. Notice how in our C# sample, the URLs work fine even if you have words in front of the URL.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.