开发者

Regular expression parsing

My input is a regular expression, for example: [0-]\sbla\scd\s\^a I want to get the unchangeable strings. The output f开发者_开发问答or the example would be:

bla
cd
^a

Does anyone know about a program which does that, source code would be helpful. (it's not homework :)


You should look at the code of a regex parser. It would get the "unchangeable" strings while parsing. If it expose the parsing tree, you can have what you want. it would be better than writing your own parser ...

Try the source of something like libregex :)

my two cents.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜