Article View: be.comp.programming
Article #5270Re: Regex gezocht :-)
From: Sam Mildener
Date: Sat, 17 May 2003 08:54
Date: Sat, 17 May 2003 08:54
30 lines
2109 bytes
2109 bytes
Gunter Schelfhout wrote:
> Philip Paeps wrote:
>
> [knip]
>
>>>> aan't opruimen. Ik ben nu op zoek naar een relatief eenvoudige
>>>> regex die de meest gangbare URIs zou kunnen matchen.
>>>>
>>>> Orgineel dacht ik aan iets als:
>>>>
>>>> "((((ht|f)tps?)|mailto|news):(//)?[^\\
>>>> >\"\\t]*|www\\.[-a-z0-9.]+)[^\\,;\\t>\">]*"
>>>
>>> m/((ht|f)tps?)|mailto|news):/{2}(\w+\.){1,}\w{2,4}/
>>
>> Dat ziet er inderdaad veel schattiger uit dat het monsterlijk beest
>> dat ik had. We gaat dat diertje eens grondig testen zie, thanks! :-)
>>
>
> Maar niet goed genoeg.
> Dit doet blijkbaar wel beter zijn werk. (een paar keer getest met
> valide en niet-valide URL's):
>
> m/(((ht|f)tps?)|mailto|news):\/{2}(\w+\.)*\w+\.\w{2,4}$/
Gaat deze en de vorige niet het .museum top level domain tegenhouden?
--
Sam Mildener
Technical Details
Message-ID:
<OMmxa.1873$6M6.338685031@hestia.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!204.71.34.3!newsfeed.cwix.com!ossa.telenet-ops.be!hestia.telenet-ops.be.POSTED!not-for-mailReferences:
<eiTwa.4046$1u5.427@afrodite.telenet-ops.be> <gKTwa.4075$1u5.338@afrodite.telenet-ops.be> <M5Uwa.4091$1u5.393@afrodite.telenet-ops.be> <6jUwa.4110$1u5.338@afrodite.telenet-ops.be>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: fcea4,684f38c17c2adebc X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2003-05-17 02:00:06 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!wn14feed!worldnet.att.net!204.71.34.3!newsfeed.cwix.com!ossa.telenet-ops.be!hestia.telenet-ops.be.POSTED!not-for-mail From: "Sam Mildener" <nospam@hotmail.com> Newsgroups: be.comp.programming References: <eiTwa.4046$1u5.427@afrodite.telenet-ops.be> <gKTwa.4075$1u5.338@afrodite.telenet-ops.be> <M5Uwa.4091$1u5.393@afrodite.telenet-ops.be> <6jUwa.4110$1u5.338@afrodite.telenet-ops.be> Subject: Re: Regex gezocht :-) Lines: 32 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <OMmxa.1873$6M6.338685031@hestia.telenet-ops.be> Date: Sat, 17 May 2003 08:54:06 GMT NNTP-Posting-Host: 81.82.97.144 X-Complaints-To: abuse@telenet.be X-Trace: hestia.telenet-ops.be 1053161646 81.82.97.144 (Sat, 17 May 2003 10:54:06 CEST) NNTP-Posting-Date: Sat, 17 May 2003 10:54:06 CEST Organization: Telenet Internet