
jhardin at impsec
May 17, 2012, 3:16 PM
Post #2 of 3
(255 views)
Permalink
|
|
Re: ***Possible SPAM*** Re: regex needed for http link
[In reply to]
|
|
On Thu, 17 May 2012, Joseph Acquisto wrote: > I attempted to adapt something from a similar regex provided by a vendor > of a commercial product. It was to detect country codes we do not want > to accept mail from. No doubt my ignorance of SA and regex in general > will be on display for the amusement of many. > > rawbody URI_RU m,^https?://[^.\.][ru]/,i heh. Yeah, that won't work. "[]" means a character class, one character that matches anything within the square brackets. What the above RE says is: blah blah blah // (not-period OR period) (r OR u) / ...so it would match, for example: https://.r/ https://.u/ but never: https://{anything}.ru/ And you actually had success testing that from the command line? -- John Hardin KA7OHZ http://www.impsec.org/~jhardin/ jhardin [at] impsec FALaholic #11174 pgpk -a jhardin [at] impsec key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79 ----------------------------------------------------------------------- Justice is justice, whereas "social justice" is code for one set of rules for the rich, another for the poor; one set for whites, another set for minorities; one set for straight men, another for women and gays. In short, it's the opposite of actual justice. -- Burt Prelutsky ----------------------------------------------------------------------- 2 days until SpaceX Dragon first mission to ISS
|