Ben Bacarisse
5/18/2011 11:44:00 PM
Seebs <usenet-nospam@seebs.net> writes:
> On 2011-05-18, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>> James Kuyper <jameskuyper@verizon.net> writes:
>><snip>
>>> Please explain what you want to do. If your answer contains, anywhere
>>> within it, the words "regex", "library", "henry", "spencer", "RE", or
>>> "try.c", then you're still answering the wrong question - please rewrite it.
>
>> I agree that the OP has not answered the question the Seebs asked, but I
>> don't see why he or she must answer it. What's wrong with asking (in a
>> round about way) "can you help me use the XYZ library?".
>
> The lack of any indication of what the problem is. Consider the following
> questions I might have about a regex library:
>
> * How do I link this with my program?
> * Why does a binary I built with this not run on other machines?
> * How do I build with this if I don't have root privileges for the install?
> * Any time I try to refer to the data types for this library, I get
> complaints about unknown types, what am I doing wrong?
> * I can't understand the difference between basic and extended regular
> expressions, can someone tell me?
> * Do I have to call regfree() every time I use a regular expression, or just
> once when I'm done with it?
> * If I never call regfree(), do I have a memory leak?
> * What does regcomp() actually do?
> * What arguments should I provide to regcomp()?
> * What's the difference between regcomp() and regexec()?
>
> All of these might be ways in which I needed help using it. I could write
> a (short) book of information on using Spencer's regex library, and still not
> have hit the specific problem the OP might or might not have been
> having.
Really? I doubt that very much. I think OP is having very general and
basic problems many of which would be answered by such a book. In fact,
I suspect the OP would be thrilled with a simple well-commented example
of using the library in a short C program.
> What's lacking is any indication of what the OP wants to do, and what part
> of it isn't working or making sense.
I feel I got a sense of that -- they were at sea with whole thing.
That's one reason, I suspect, they could not be more specific about what
was not working. I may be wrong, but asking "what do you want to do?"
when the answer seems to be "to learn how to use this library" is
unlikely to get a lot more detail out of a beginner.
> We don't know whether the OP has read
> the documentation (although I'm guessing not), or ever reads documentation,
> or actually knows what a regex is, or is on a platform where these functions
> are not a part of the system library, or anything.
Indeed. Note that would not (and did not) comment on any of these being
asked.
> No place to start.
That's one way of looking at it. My view is that there lots of places
to start.
--
Ben.