Hi DVDTracker,
I assume you are talking PERL regexps? There is slightly different syntax for different languages (various UNIX shells, xemacs, C language, etc).
The problem is anything in brackets means you are only matching one letter by default.
So your expression matches:
a&a.com
because it is finding a match with the underlined portion:
a&[u]a.com[/u]
If you are trying to match any alphanumeric for any number of characters, followed by the .net, .com, or .org domains, your expression should look like this:
[b]^[a-zA-Z0-9]+\.com|net|org$[/b]
I'm assuming the rest of your syntax is right. Offhand I forget how the logical or operator works (the |).
The changes are the ^ anchor. This anchors your regexp to the beginning of the word. That was why your previous regexp was not excluding the "a&" portion in your example -- you didn't tell it that it couldn't have anything in front of the string you were matching.
The other change is the "+" modifier. As I said earlier, anything in brackets denotes just one character. So the + modifier means that you are now matching for one or more characters that meet the criterion of [a-zA-Z0-9]. If it was okay to have zero or more characters, you could use the * modifier instead of the +, but I don't think that is what you want in your example.
Hope that helps and it wasn't too terribly confusing. Let me know if you need any follow up clarification.
Dilbert
[Edited to fix UBBcode]
__
If it ain't broke, fix it till it is!