doctrine/doctrine2 — pull request #208 by thunderer (2011-11-30 16:38:31+00:00)
Title: Allow entity name filtering by regexp in doctrine:mapping:import.

While working on a Symfony2 project I found it extremely useful to be able to filter entity names by regexp when importing entities to YAML metadata. This small commit makes it possible without any BC breaks or something. I've written about it on my blog: http://blog.kowalczyk.cc/2011/11/11/symfony2-importing-entity-mapping-data-using-regular-expression-filters/ .

Without this commit:

```Bash
./app/console doctrine:mapping:import ThunderSampleBundle yml --force --filter="Category" --filter="User"
```

Imports everything that contains "Category" or "User" in its name. With my commit:

```Bash
./app/console doctrine:mapping:import ThunderSampleBundle yml --force --filter="^Category" --filter="^User$"
```

Imports only wanted entities. And you can use both ways simultaneously, because ```preg_match("/{name}/")``` does the same as ```strpos("{name}");```.