Hello. On the seventh April 2007 I wrote:

Mistakes, as always. TB! sometime uses 'non-breaking space' (character
with code x0A) as a space.

> This  regexp  splits an url into two parts - the first with old url,
> and  the  second, longer with special characters. So, You must click
> on part after 'ß'. I think this is a 'safe solution'.

(?i)(HREF\x3D\"(.*?)\"\>.*?\<\/A\>)([^\xA0\s\.\,\&\(\)\<\>\!\;][^\xA0\s\<\>\&]*)=\1<A
 HREF="\2\3">\3</A>

> If You prefer one long url use this regexp:

(?i)(HREF\x3D\".*?)(\"\>.*?)(\<\/A\>)([^\xA0\s\.\,\&\(\)\<\>\!\;][^\xA0\s\<\>\&]*)=\1\4\2\4\3

A short explanation. First we search a fragment 'HREF="addres' (\x3D
stands for '='), the second substring is '">addres', the third '</A>'.
The fourth is hardest to understand: we search a sign which is NOT a
non-breaking space or dot, comma, ampersand or parentheses etc (if
there is other character, it should be a part of URL). After that we
search for any number of characters which are not a space,
non-breaking space, '<' or '>'. And which is not an ampersand '&' -
this could be controversial, because ampersands are valid in URLs, but
it's also a special character in HTML entities (for example '&gt;')
and it's hard to distinguish an ampersand in entity and in 'part of
URL after national character'.

> Both  doesn't  if  national  character  is  a  first character after
> 'www.'.

...but this somewhat works. At least with Jernej's example
http://čšž.ena.si/ or with page like this: www.żółw.pl

(?i)(?<![\"\/\:]|\">)(((https?\:\/\/)|(www\.))[^\xA0\s\,\&\(\)\<\>\!\;]{3,})=<A 
HREF="\1">\1</A>

Tested (too little) with Opera and Windows XP.

BTW a plugin for IE: <http://www.idnnow.com/>

-- 
Pozdrawiam
Konrad Szkudlarczyk


----------------------------------------------------------------------
Nieograniczona pojemnosc skrzynki email
>>> http://link.interia.pl/f19e6



________________________________________________________
 Current beta is 3.98.10 | 'Using TBBETA' information:
http://www.silverstones.com/thebat/TBUDLInfo.html
IMPORTANT: To register as a Beta tester, use this link first -
http://www.ritlabs.com/en/partners/testers/

Reply via email to