Issue adding space with regular expression
-
Hi. Thank you for this plugin. I can already tell it is going to save me a bunch of time.
I am trying to copy the data in title field to the alt text field. I followed your guide here and was able to get it to work.
However, some of the titles include “-” and I need those replaced with a simple space. I am using
template:[+post_title,replace( '/-/', ' ')+]in the EXIF/Template Value field. This removes the “-” but does not insert a space. I have tried other variables in the “r” argument and those return just fine. I also copy and pasted the code in the documentation directly and it also does not return a space.For a simple example, ,replace( {‘/,/’ ‘/-/’}, {‘ ‘ ‘_’} ) will change commas to spaces and dashes to underscores, while ,replace( {‘/,/’ ‘/-/’}, ‘ ‘ ) will change both commas and dashes to spaces.
Are you able to help me figure out why a space is not being returned?
The topic ‘Issue adding space with regular expression’ is closed to new replies.