ENH: support negated regular expressions (#2283)

- extendes the prefix syntax to handle '!' values.

  For example,  "(?!).*processor.*" or "(?!i)inlet.*"
This commit is contained in:
Mark Olesen
2021-12-03 15:32:54 +01:00
parent 49e26dd7d2
commit e09298092d
8 changed files with 478 additions and 188 deletions

View File

@ -1,7 +1,7 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / O peration | Version: v2112 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
@ -12,6 +12,8 @@
(
( true "(U|k|epsilon)" "U" )
( false "(U|k|epsilon)" "alpha" )
( true "(?!)(U|k|epsilon)" "alpha" )
( true "(?! *&)(U|k|epsilon)" "alpha" ) // Ignore unknown content
( true "ab.*" "abc" )
( true ".*" "abc" )