I have just started with Flex and can't seem to figure out how to match the following Expression :

```
"Dog".*"Cat"
------------------
Input :
Dog Ca Cat Cc Cat
------------------
Output:
Dog Ca Cat Cc Cat

```

But I want a non-greedy matching, with the following output :

```
Output:
Dog Ca Cat

```

How can this be acheived on Flex ?

***EDIT***

Tried the following :

```
%%
Dog.*Cat/.*Cat  printf("Matched : ||%s||", yytext);
dog.*cat        printf("Matched : ||%s||", yytext);
dOg[^c]*cAt     printf("Matched : ||%s||", yytext);
DOG.*?CAT       printf("Matched : ||%s||", yytext);
%%

```

**Input :**

```
Dog Ca Cat Cc Cat
dog Ca cat Cc cat
dOg Ca cAt Cc cAt
DOG CA CAT CC CAT

```

**Output :**

```
Matched : ||Dog Ca Cat Cc Cat||
Matched : ||dog Ca cat Cc cat||
Matched : ||dOg Ca cAt|| Cc cAt
Matched : ||DOG CA CAT CC CAT||

```

**Also receiving a warning :** 

```
lex4.l:2: warning, dangerous trailing context

```

**Flex Version :**

```
flex 2.5.35 Apple(flex-31)

```