Support is online

Replace rule regexp #7523

Open gnsbud opened this topic Thursday, 06 August 2015 · 3 replies
Author

Hi,

CSVI Pro 6.0.1

in attachment my Replace rule settings. While exporting I'm receiving following warning:

Warning: preg_replace(): No ending delimiter '.' found in /plugins/csvirules/replace/replace.php on line 137

and replace isn't done. I know I can turn off warning display, but even if it's off, still no replacement is done.

Can you help?

Best regards,
Chris

  • replace-settings.png
Support

Hello Chris,

Turning a warning off usually is not the fix :)

The root cause of your problem is that your regex is incomplete. Each regex needs to be enclosed in /-symbols. So in your case it would look like

/.*?text one$/|/.*?text two$/

Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Author

Hi,

it's working, also I found out I had in my "find" field some "/" and "|" characters. Is there any way to use "|" character inside "find" input? Maybe "|" or it won't work because it will be always "exploded" by some php function while using multivalues?

Best regards,
Chris

Support

Hello Chris,

Is there any way to use "|" character inside "find" input?

You can't as you said, it is always used to explode the values. What you can do is make multiple replacement rules and assign them to the same field. CSVI will execute them in the order they are listed on the rules page.

Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory

Log in to reply to this topic.