testDictRegex 1.22 KB
Newer Older
1 2 3
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
4
|  \\    /   O peration     | Version:  v2006                                 |
Andrew Heather's avatar
Andrew Heather committed
5
|   \\  /    A nd           | Website:  www.openfoam.com                      |
6 7
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
8 9
FoamFile
{
10 11 12 13
    version     2.0;
    format      ascii;
    class       dictionary;
    object      testDictRegex;
14 15 16 17 18 19 20
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#inputMode  merge

".*"        parentValue1;
"[n-z].*"   parentValue2;
"f.*"       parentValue3;
21 22
keyX        parentValue4;
keyY        parentValue5;
23

24
"(.*)Dict"
25 26
{
    foo         subdictValue0;
27
    //bar         $f.*;         // should this really match 'foo'?
28 29 30 31 32

    // result is dependent on insert order!
    "a.*c"      subdictValue3;
    "ab.*"      subdictValue2;
    "a.*"       subdictValue1;
33
    abcd        \1;
34 35 36
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //