openfoam/applications/test/regex/testRegexps
Mark Olesen 461ac4b4cc regExp - separate full match from partial match, add find()
- match() only does a full match
  - find() and search() do partial matches
    search() is similar to the name coming into C++ TR1
2009-01-05 09:37:52 +01:00

22 lines
911 B
C++

/*-------------------------------*- C++ -*---------------------------------*\
| ========= |
| \\ / OpenFOAM |
| \\ / |
| \\ / The Open Source CFD Toolbox |
| \\/ http://www.OpenFOAM.org |
\*-------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// pattern, string
(
( "a.*" "abc" )
( "a.*" "bac" )
( "a.*" "abcd" )
( "a.*" "def" )
( "d(.*)f" "def" )
( " *([A-Za-z]+) *= *([^ /]+) *(//.*)?" " keyword = value // settings" )
)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //