Please fix the linkification code that if the ticker is part of a URL (i.e. not a stand alone token) the linkification should not be performed. Example Ted's URL to marketwatch.
http://www.marketwatch.com/investing/fund/VUSTX;
I've pasted alternative hex encoded representation of the URL to get the correct behavior above. If I were not to encode it and simply paste the URL, the linkification software would break it. This must be fixed. Below is the broken behavior.
http://www.marketwatch.com/investing/fund/VUSTX
Comments
VUSTX (OAKBX)
reply to @Investor
What you say is obvious the logic that should be followed. The problem lies with the implementation.of the pattern matching.
a callback function is called on the message and it is parsed as so
with a preg_replace_callback function in php.
the patttern in PCRE is this
new RegEx --------- '/\b\p{Lu}{3,6}\b/u'
I suggested a mod like this
my suggested RegEx --------- '/\S*\b\p{Lu}{3,6}\b/u';
However, words at the beginning of the column don't work.
What is your suggested replacement string.
investor's replacement REGEX ____________________________
Until the fix is in: the easiest workaround is to lowercase ticker or your plan.
when people post links to funds they can try lowercasing the ticker symbol in the link and if the site read lowercase or converts it it will work.
http://www.marketwatch.com/investing/fund/vustx
(VUSTX)
/\s+\p{Lu}{3,6}\s+|^\p{Lu}{3,6}\s+|\s+\p{Lu}{3,6}$|^\p{Lu}{3,6}$/u
If \s includes \n, perhaps it could be reduced to:
/\s+\p{Lu}{3,6}\s+|^\p{Lu}{3,6}\s+/u
I actually would prefer \p{L} only in above to cover both upper and lower case.
Ticker in first column
VWESX
Also there are issues of eating parts of the text. See the test cases at: http://www.mutualfundobserver.com/discuss/index.php?p=/discussion/1007/ping-brad-chip-bee-techies...highlighted-tickers-inoperative-in-my-posts-others-ok-
PRPFX (no leading space)
PRPFX (leading space)