Hello!
I've been using CLI for a few days now and it has greatly sped up the wiki migration i'm doing. Today i've been doing a lot of findReplace and findReplaceRegex to replace common things throughout very similiar articles, but i ran into a little problem wich i can't seem to figure out.
What i'm trying to achieve is this: i need to find strings that start with '@' and have all capital letters and then, with the match, i want to put <span class='myclass'> </span> around it to get some simple syntax highlighting. I'm not a big expert on regular expressions, but from what i can remember shouldn't it be possible to use string replacement on the right hand part of the findReplaceRegex action call parameter in order to re-use the matched string?
I've found this example at the documentation:
--findReplaceRegex "(a )(test)(.*):\$1\$3#\$2#"
Which seems to be doing something similiar to what i want, using the matched strings again to replace the existing ones. However, i can't get this to work. When i do it like this it just prints \$1\$3#\$2# as string in my article.
Any idea if it's possible to get it working? Would again be a great time saver. This is what i have so far:
--findReplaceRegex "(@)([A-Z)
$&"
Thanks in advance!