I think that regex should not be treated as a separate parser.
Using regex alone is sometimes inefficient and not intuitive, while the other two may sometimes need preg_replace to deal with some complex tasks.
We need a way to use regex with the other two parsers.

I think it's not hard to implement. We just need a way to instruct the parser when to use regex.
Perhaps we can make a check on $element_key. If it's a regex string, then do a regex query.

Comments

twistor’s picture

I understand where you're coming from on this. First, let me say that pretty soon, each field will be able to select its own parser type. This would allow, regex for one field, XPath for another, and QueryPath, for even another.

The issue of preg_replace is interesting. It seems that what you're talking about is processing(not in the Feeds sense) the data. This is something I've been playing around with for a while. See http://drupal.org/node/663860, for some background and the current ideas on this topic.

If it comes down to it, I'm willing to add that functionality here, but I think it makes much more sense to add a step in between Parsing and Processing.

twistor’s picture

Status: Active » Closed (works as designed)