2011-09-21 105 views

回答

0

你可以这样做:

myString.replace(/(?=http://.....)(\S{,25})\S*/g, '<a href="$0">$1</a>'); 

虽然这不会显示省略号