At first glance, the StringReplacer does permit getting the regexp
from an attribute, so I would probably read the CSV, compress it into
a list and add that list to the incoming features.
Then, run them through a custom transformer loop. Use a ListIndexer
inside the loop to fetch the next regexp, and the StringReplacer to
apply it.
If there are conditions - like you might use in a SchemaMapper - then
you'll need to add a Tester transformer instead.
Hope this helps. It's certainly the first thing I would try.
Regards
Mark
Mark Ireland | Senior Product Specialist
Safe Software Inc.
Suite 2017, 7445-132nd Street, Surrey, BC, CANADA
T 604.501.9985 | F 604.501.9965
http://www.safe.com/support | Twitter @FMEDoctors | http://www.fmepedia.com
On May 3, 11:28 pm, SigTill <shers...@gmail.com> wrote:
> Is it possible to use the Schemamapper with regexp?
> I have a XLS/CSV-file with regexp translations that I want to run on
> certain attributes.
> For instance I want to rename the value of the attribute MyColor
> From:
> Feature1.MyColor = my color is yellow
> Feature2.MyColor = brown is an ugly color
> Feature3.MyColor = Colors for geeks are #6B2525
> To:
> Feature1.MyColor = Yellow
> Feature2.MyColor = Brown
> Feature3.MyColor = AnotherBrown
> So I want to use the Stringreplacer with regexp (more advanced than this
> examples, searching for patterns), but with dynamic input (like with a
> schemamapper)
> I dont see a way of doing this right now. Any tips?