"...CommunitySharings/AutomlPracticeSharing/NasComparison.md" did not exist on "c8ef41413f6d1509fdda50d5854089b55a92d585"
testRegexps 1.35 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
37
38
39
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

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

// Pattern, String
(
    ( true  "a.*"  "abc" )
    ( true  "a.*"  "abc" )
    ( false "a.*"  "bac" )        // partial match only
    ( true  "a.*"  "abcd" )
    ( false "a.*"  "def" )
    ( false ".*a.*"  "Abc" )
    ( true  "(?i).*a.*"  "Abc" )
    ( true  "d(.*)([xy]*)([f-p])"  "def" )
    ( false "d(.*)([xy]*)([f-p])"  "xxdef" )
    ( true
        " *([A-Za-z]+) *= *([^ /]+) *(//.*)?"
        "   keyword  = value // comment"
    )
    (
        false   // partial match only
        "[[:digit:]]"
        "contains 1 or more digits"
    )
    (
        true
        "[[:digit:]]+-[[:digit:]]+-[[:digit:]]+-[[:digit:]]+"
        "1-905-123-2234"
    )

)

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