What is
grep --extended-regexp --ignore-case '[[
unct:]]{1}[[:alnum:]]{3}$'
supposed to match?
First of all, the guys who responded by slaming you for not specifying
the language are total idiots, don't worry about them. It was clear
from reading the *whole* post exactly what you were asking ( even
in an inappropriate newsgroup ). It actually did you good, because
these guys took themselves out of the running for answering your
questions. In my experience the reply they give is often stupid
precisely because they haven't read your whole post.
Send off. The groups that you asked in seem at least moderately
appropriate. comp.lang.awk seems a bit of a stretch, still not
a bad group to ask a regex question about. comp.lang.perl.misc
given it's reputation, I would not say it is a bad question for that
group. comp.programming, perfect forum, Virtually every modern
PL has a regex library, why's that? For the same reason a regex
question is appropriate here. Certainly more appropriate than
questions about IDEs or such. gnu.utils.help, grep is a gnu util, No?
Given that sometime peoples have questions which do not seem to
fit in an appropriate newsgroup, your choices seemed OK.
Now for the answer to your question.
If "abc" is a matched string, then grep may be trying to match to
the string "abc"$. Regex's are *not standardised* and vary from
implementation to implementation. Many implementations won't
like your
unct:, :alpha: constructs. I've used as delimiters for
grouping (),\(\),\\(\\),\\\\(\\\\). This isn't going to change anytime
soon, since there are literally millions of elisp,awk,sed,perl,...
libraries that use their form of regex, and the users will hound
to death the person that changes it ( better to suggest reducing
Social Security in a seniors home ).
There are other aspects. Someone suggested that there might be
white spaces at thje end. '[[
unct:]]{1}[[:alnum:]]{3}[:white:]*$'
or '[[
unct:]]{1}[[:alnum:]]{3}[ \t]$' should work if that is the
case.
Another suggested that your EOL might not be what grep expects it to
be. I would think that most greps consider the "system" EOL as EOL.
Open the file you are greping in emacs. If it says something like
UNIX in the status line then that may be the case. Otherwise it
probably isn't.
Finally I would create a test file, with text:
"abc$def"
"ghijkl "
"mnopqr"
( spaces are delimiters here ).
Grep for abc, abc$, jkl$,"jkl $","def"
see what kind of results you get.
The reply-to email address is (e-mail address removed).
This is an address I ignore.
To reply via email, remove 2002 and change yahoo to
interaccess,
**
Thaddeus L. Olczyk, PhD
There is a difference between
*thinking* you know something,
and *knowing* you know something.