From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] How about some software? From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20020617183023.5376D19B14@mail.cse.psu.edu> Date: Mon, 17 Jun 2002 19:35:39 +0100 Topicbox-Message-UUID: b162a2d0-eaca-11e9-9e20-41e7f4b1d025 rob writes: > type is text > data matches '(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://[a-zA-Z0-9_@\-]+([.:][a-zA-Z0-9_@\-]+)*/?[a-zA-Z0-9_?,%#~&/\-+=]+([:.][a-zA-Z0-9_?,%#~&/\-+=]+)*' i've been using a similar rule for a while now; my rule looks like: achar='[a-zA-Z0-9_+@]' qchar='[a-zA-Z0-9_?,%!#~&.=@+/\-;]' type is text data matches '(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://'$achar'+([.:]'$achar'+)*/?'$qchar'+([:.]'$qchar'+)*' which covers some cases the former doesn't (and probably doesn't cover some it does). i'll leave merging the two as an exercise for the reader. it's been a looong day.