title: PHP regex replace based on \v character (vertical tab)
body: <p>I have a character string like (ascii codes):</p>
  
  <pre><code>32,13,7,11,11, 
  "string1,blah;like: this...", 10,10, 32,32,32,32, 138,138, 32,32,32,32, 13,7, 11,11, 
  "string2/lorem/example-text...", 10,10, 32,32,32,32,32, 143,143,143,143,143
  </code></pre>
  
  <p>So the sequence is: </p>
  
  <ol>
  <li>any characters, followed by my search string, followed by any
  characters </li>
  <li>11,11 </li>
  <li>the string I want to replace </li>
  <li>any non-printable characters</li>
  </ol>
  
  <p>If the block contains <code>string1</code> then I need to replace the next string with something else. The second string always starts directly after the 11,11.
  I'm using PHP.</p>
  
  <p>I thought something like this, but I am not getting the correct result:</p>
  
  <pre><code>$updated = preg_replace("/(.*string1.*?\\v+)([[:print:]]+)([[:ascii:]]*)/mi", "$1"."new string"."$3", $orig);
  </code></pre>
  
  <p>This puts "new string" between the 10,10 and the 138,138 (and replaces the 32's).
  Also tried \xb instead of \v.</p>
  
  <p>Normally I test with regex101, but not sure how to do that with non-printable characters. Any suggestions from regex guru's?</p>
  
  <p><strong>Edit</strong>: the expected output is the sequence: </p>
  
  <pre><code>32,13,7,11,11, 
  "string1,blah;like: this...", 10,10, 32,32,32,32, 138,138, 32,32,32,32, 13,7, 11,11, 
  "new string", 10,10, 32,32,32,32,32, 143,143,143,143,143
  </code></pre>
  
  <p><strong>Edit</strong>: sorry for the confusion regarding the ascii codes.
  Here's a complete example:</p>
  
  <pre><code>&lt;?php 
  
  $s  = chr(32).chr(32).chr(7).chr(11).chr(11);
  $s .= "string1,blah;like: this...". chr(10).chr(10).chr(32).chr(32).chr(32).chr(32).chr(138).chr(138);
  $s .= chr(32).chr(32).chr(32).chr(32).chr(13).chr(7).chr(11).chr(11);
  $s .= "string2/lorem/example-text...". chr(10).chr(10).chr(32).chr(32).chr(32).chr(32).chr(32).chr(143).chr(143).chr(143);
  
  $result = preg_replace('/(.*string1.*?\v+)([[:print:]]+)([[:ascii:]]*)/mi', "$1"."new string"."$3", $s);
  echo "\n------------------------\n";
  echo $result;
  echo "\n------------------------\n";
  </code></pre>
  
  <p>The text <code>string2/lorem/example-text...</code> should be replaced by <code>new string</code>.</p>