#161 Want: [.]c$ pattern on a string buffer

open
nobody
None
5
2012-10-02
2012-03-15
Clem Wang
No

(reposted from forum)

Here's a reasonable use case that I have in mind. Suppose I have a bunch of C strings in memory that represent file names. Suppose I want to match filename suffixes.

In other systems (e.g. Python), I would use this regexp to match .c files:

"[.]c$"

This pattern would NOT match: "foo.com.cpp"

I'm not clear how I would do this in Quex.

I'm now tempted to append a '\n' after the filename so that I can do this, which is not what I really want to do...

I do see that Gnu Flex treats <<EOF>> in the same way as Quex. It's not clear to me if Flex would match EOF with $.

Thanks.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks