testDictRegex 1.22 KB
Newer Older
shunbo's avatar
shunbo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      dictionary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#inputMode  merge

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

"(.*)Dict"
{
    foo         subdictValue0;
    //bar         $f.*;         // should this really match 'foo'?

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

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