pattern matching with the function glob. 
Author Message
 pattern matching with the function glob.

Hi all,

I want to determine the content of a directory with the function glob.
But i want the file wich names contains only digits.

I do so:
int errfunc
{
   //something
     return 0;

Quote:
}

const char *pattern = "[0-9]*";
glob(pattern, 0, errfunc, &content) ....    //this gives also a file like
123ab;

how can i avoid files like this.

Thanks.



Tue, 10 Aug 2004 18:39:20 GMT  
 pattern matching with the function glob.

Quote:
> Hi all,
> I want to determine the content of a directory with the function glob.
> But i want the file wich names contains only digits.
> I do so:
> int errfunc
> {
>    //something
>      return 0;
> }
> const char *pattern = "[0-9]*";
> glob(pattern, 0, errfunc, &content) ....    //this gives also a file like
> 123ab;
> how can i avoid files like this.

What is the function glob()? I don't believe there is one in the ISO
standard C library.

--

| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste       W++ B OP+                     |
\----------------------------------------- Finland rules! ------------/
"This is a personnel commuter."
   - Train driver in Scientific American



Tue, 10 Aug 2004 18:59:38 GMT  
 pattern matching with the function glob.
the glob function is a POSIX.2 standard



Quote:

> > Hi all,

> > I want to determine the content of a directory with the function glob.
> > But i want the file wich names contains only digits.

> > I do so:
> > int errfunc
> > {
> >    //something
> >      return 0;
> > }

> > const char *pattern = "[0-9]*";
> > glob(pattern, 0, errfunc, &content) ....    //this gives also a file
like
> > 123ab;

> > how can i avoid files like this.

> What is the function glob()? I don't believe there is one in the ISO
> standard C library.

> --

> | Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
> | http://www.helsinki.fi/~palaste       W++ B OP+                     |
> \----------------------------------------- Finland rules! ------------/
> "This is a personnel commuter."
>    - Train driver in Scientific American



Tue, 10 Aug 2004 19:31:04 GMT  
 pattern matching with the function glob.

Quote:
> the glob function is a POSIX.2 standard

So discuss it on a group where POSIX.2 is topical, then, for example
comp.unix.programmer. This newsgroup is about *the ISO C standard*, not
about any possible specification or API which has been briefly brushed
against C.

Quote:



>> > Hi all,

>> > I want to determine the content of a directory with the function glob.
>> > But i want the file wich names contains only digits.

>> > I do so:
>> > int errfunc
>> > {
>> >    //something
>> >      return 0;
>> > }

>> > const char *pattern = "[0-9]*";
>> > glob(pattern, 0, errfunc, &content) ....    //this gives also a file
> like
>> > 123ab;

>> > how can i avoid files like this.

>> What is the function glob()? I don't believe there is one in the ISO
>> standard C library.

--

| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste       W++ B OP+                     |
\----------------------------------------- Finland rules! ------------/
"How come even in my fantasies everyone is a jerk?"
   - Daria Morgendorfer


Tue, 10 Aug 2004 20:12:31 GMT  
 pattern matching with the function glob.

Quote:

>> the glob function is a POSIX.2 standard
> So discuss it on a group where POSIX.2 is topical, then, for example
> comp.unix.programmer. This newsgroup is about *the ISO C standard*, not
> about any possible specification or API which has been briefly brushed
> against C.

I meant about *ISO standard C*, in other words, what *the ISO C
standard* specifies, not about the standard itself. comp.std.c is for
the latter purpose.

--

| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste       W++ B OP+                     |
\----------------------------------------- Finland rules! ------------/
"A bicycle cannot stand up by itself because it's two-tyred."
   - Sky Text



Tue, 10 Aug 2004 20:13:29 GMT  
 pattern matching with the function glob.

Quote:

> the glob function is a POSIX.2 standard

And therefore OT in comp.lang.c. Try a POSIX group. Failing that,
comp.unix.programmer may be able to help.

Jonny T.

one's from college.
**if I'm wrong, fwap me with a spoon.



Tue, 10 Aug 2004 21:39:36 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. glob pattern matching algorithm wanted

2. Regular Expressions/Pattern Matching/Unordered pattern

3. Q: Pattern matching function

4. Compiler bug: Overloaded function template pattern matching

5. looking for fast PD pattern matching functions

6. Pattern Matching in C -

7. Pattern Matching Tool

8. Pattern Matching in C

9. Help, Pattern used in Regex.Matches(...)

10. pattern matching and string replacement

11. help with a fast pattern matching utility requested

12. Pattern Matching in execution time

 

 
Powered by phpBB® Forum Software