学习正则表达式的几个网址
实现一个脚本引擎
http://dev.gameres.com/Program/Abstract/ScriptEngine.htm
英文:
http://www.flipcode.com/articles/scripting_issue02.shtml
(写得不错,是一个学习编译原理, lee 和yacc 的好的参考)
写一个属于自己的正则表达式引擎 Writing own regular expression parser
(RegExDemo.zip) http://www.codeproject.com/cpp/OwnRegExpressionsParser.asp
(代码非常小,只有8K)
在VC6上使用boost带的正则表达式:http://vckbase.com/document/viewdoc/?id=1636
在VC6上使用greta 带的正则表达式 The GRETA Regular Expression Template Archive
GRETA 2.6.4 for VC6
http://www.nk975.com/sswater/en/greta/index.htm
http://research.microsoft.com/projects/greta/
Features include:
- Fast backtracking regular expression engine.
- Separately compiled patterns.
- Matches against C-style NULL-terminated strings, C++-sytle std::string's, or iterator ranges.
- Template on iterator type and syntax module.
- Supports Unicode.
- Syntax is encapsulated in easily customized/replaced modules. (Perl and POSIX syntax modules included.)
- Match balanced, nested tags with a recursive pattern. Great for HTML/XML/SOAP processing.
- Many times faster than the .NET/ATL7 regex classes.
- Consistently outperforms than boost regex++ on short strings;
GRETA library has 6 program files:
- regexpr2.h
- regexpr2.cpp
- syntax2.h
- syntax2.cpp
- restack.h
- reimpl2.h
You can use them in 2 ways:
(1) Add these files into your project directly. ( not recommended )
(2) Create a new 'Win32 Static Library' project for GRETA in your workspace.