parsing filename

Hello, im trying to parse the file name using strtok(), can anyone tell me how to use '\\' or '//' as delimiters with strtok?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include    <string.h>
#include    <stdio.h>

    const char *Delim = "/";
    
int main () {
    char Entry [256];
    char *Match;
    
    gets (Entry);
    Match = strtok (Entry, Delim);
    
   // Each time around Match will be the tokenized string excluding delimiter
    do {
        Match = strtok ( NULL, Delim);
        } while ( Match );
        
    return 0;
    }


To search for backslash Delim = "\\"
Last edited on
thank you!!
Topic archived. No new replies allowed.