Quick Regular Expression help needed :)

gopunk

Lifer
Jul 7, 2001
29,239
2
0
what is one that will match all email addresses with some text "ns1.opt" in it? it isn't by itself, it's often something like "blah@ns1.optinblahblahblah.com"

oh and also what is one that will block some specified domain?

i wish i had time to learn them.... but alas...

thanks! :)
 

Harvey

Administrator<br>Elite Member
Oct 9, 1999
35,059
73
91
Huh? You want to block these addresses in what program?
rolleye.gif
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
Originally posted by: Harvey
Huh? You want to block these addresses in what program?
rolleye.gif

um, i put them in a file that the program reads :) listproc is the program, if you're interested...
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
Originally posted by: n0cmonkey
more somefile.txt | grep ns1.opt

er... i actually need to be able to put it in a file so that it can be read and matched.... this is for email filtering :)
 

MichaelD

Lifer
Jan 16, 2001
31,528
3
76
Originally posted by: gopunk
Originally posted by: n0cmonkey
more somefile.txt | grep ns1.opt

er... i actually need to be able to put it in a file so that it can be read and matched.... this is for email filtering :)


Um, may the ignorant interject here? If all you want to do is filter/block email, why can't you just do that in in Tools-->Options?
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
Originally posted by: MichaelD
Originally posted by: gopunk
Originally posted by: n0cmonkey
more somefile.txt | grep ns1.opt

er... i actually need to be able to put it in a file so that it can be read and matched.... this is for email filtering :)


Um, may the ignorant interject here? If all you want to do is filter/block email, why can't you just do that in in Tools-->Options?

mm... because this is an email list server... no gui, all command line :)

ok it's alright, it looks like the regular expression stuff for this particular software might not conform to "standard" regular expressions. forget i ever asked :p

if anyone is interested
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: gopunk
Originally posted by: MichaelD
Originally posted by: gopunk
Originally posted by: n0cmonkey
more somefile.txt | grep ns1.opt

er... i actually need to be able to put it in a file so that it can be read and matched.... this is for email filtering :)


Um, may the ignorant interject here? If all you want to do is filter/block email, why can't you just do that in in Tools-->Options?

mm... because this is an email list server... no gui, all command line :)

ok it's alright, it looks like the regular expression stuff for this particular software might not conform to "standard" regular expressions. forget i ever asked :p

Is there a standard? What program are you using? Something like *ns1.opt* would find just that phrase, but its definitely not perfect.
 

gopunk

Lifer
Jul 7, 2001
29,239
2
0
Is there a standard? What program are you using? Something like *ns1.opt* would find just that phrase, but its definitely not perfect.

oh ok, maybe there isn't a standard? hehe i always thought there was, dunno why. ok thanks i'll give that shot. i think * means something else for listproc though... something about it being a suffix and repeating
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: gopunk
Is there a standard? What program are you using? Something like *ns1.opt* would find just that phrase, but its definitely not perfect.

oh ok, maybe there isn't a standard? hehe i always thought there was, dunno why. ok thanks i'll give that shot. i think * means something else for listproc though... something about it being a suffix and repeating

Im not familiar with listproc. I dont think there is a standard but most places do it the same way, or atleast very similar.