F.6 RegexpMapper
Prev | Appendix F. Core mappers | Next

## F.6 RegexpMapper

The `RegexpMapper` changes filenames according to a pattern defined by a regular expression. This is the most powerful mapper and you should be able to use it for every possible application.

### F.6.1 Examples

    <mapper type="regexp" from="^(.*)\.conf\.xml" to="\1.php"/>

The mapper as above will do the following mappings:

Table F.5: Result of mapping

From | To
--- | ---
`test.txt` | ignore, `test.txt`
`./foo/bar/test.conf.xml` | `./foo/bar/test.php`
`someconf.conf.xml` | `someconf.php`

Prev | Up | Next
F.5 MergeMapper | Home | Appendix G. Core selectors