I have been working with Lex, and encountered a problem of finding comments in a C program and removing them in the final output. To accomplish this I need to identify any occurrence of */ (this is how a traditional multiline comment ends!).
Then my problem is reduced to a subproblem of accepting any sequence of characters other than */ . I tried out a several ways for accomplishing this. I tried out: [^*\/], and reasonably it did not work. Any help or suggestion is appreciable.
 
     
     
    