0

In VQMod it is possible to perform the same operations on multiple files by separating the file paths with a comma, e.g.

<file name="path/to/file1.php, path/to/file2.php, path/to/file3.php">

I am wanting to add the same bit of code after three other lines of code in one file. Is there a way to do this with one search instead of using three operations?

<search position="after"><![CDATA[<?php //some code here ?>, <?php some more code; ?>, <?php //more code; ?>]]></search>
Richard Parnaby-King
  • 14,703
  • 11
  • 69
  • 129

1 Answers1

1

It is possible to use regular expressions to specify the three search terms in one operation:

<search regex="true" position="after"><![CDATA[~regex-here-including-delimiters~]]></search>

So, for our three bits of code above, we get:

<search regex="true" position="after"><![CDATA[~<\?php //some code here \?>| <\?php some more code; \?>|<\?php //more code; \?>~]]></search>
Richard Parnaby-King
  • 14,703
  • 11
  • 69
  • 129