Note that there are some explanatory texts on larger screens.

plurals
  1. PORegex match before string comes up
    text
    copied!<p>So i have this file of 10,000+ lines of messages from a game server, like so:</p> <blockquote> <p>11.07.23 08:40:16 [INFO] NC: Moving violation: wolfman98 from yasmp (-90.8, 64.0, 167.5) to (-90.7, 64.0, 167.3) distance (0.0, 0.0, 0.2)</p> <p>11.07.23 10:57:44 [INFO] NC: Moving violation: AKxiZeroDark from yasmp (-1228.3, 11.2, 1098.7) to (-1228.3, 11.2, 1098.7) distance (0.0, 0.0, 0.0)</p> </blockquote> <p>The current regex code i have is: <code>\d{1,4}\.\d{1}</code>, which matches so far everything in bold:</p> <blockquote> <p><strong>11.07.23</strong> 08:40:16 [INFO] NC: Moving violation: wolfman98 from yasmp (-<strong>90.8</strong>, <strong>64.0</strong>, <strong>167.5</strong>) to (-<strong>90.7</strong>, <strong>64.0</strong>, <strong>167.3</strong>) distance (<strong>0.0</strong>, <strong>0.0</strong>, <strong>0.2</strong>)</p> </blockquote> <p>Ive been having trouble finding a way to get the part that only says:</p> <blockquote> <p>(-1228.3, 11.2, 1098.7) to (-1228.3, 11.2, 1098.7)</p> </blockquote> <p>before the "distance" word, and without the timestamp in the beginning, and eventually replacing it to end up like this:</p> <blockquote> <p>11.07.23 08:40:16 [INFO] NC: Moving violation: wolfman98 from yasmp <strong>(-#, #, #)</strong> to <strong>(-#, #, #)</strong> distance (0.0, 0.0, 0.2)</p> <p>11.07.23 10:57:44 [INFO] NC: Moving violation: AKxiZeroDark from yasmp <strong>(-#, #, #)</strong> to <strong>(-#, #, #)</strong> distance (0.0, 0.0, 0.0)</p> </blockquote> <p>And a bit of extra information, the numbers can be either negative or not, ranging from 1.0 digit to 1234.0 digits, which is why i need help matching before the word "distance" again.</p> <p>EDIT: Or even, it would be fine if the entire thing didnt show up:</p> <blockquote> <p>11.07.23 08:40:16 [INFO] NC: Moving violation: wolfman98 from yasmp distance (0.0, 0.0, 0.2)</p> <p>11.07.23 10:57:44 [INFO] NC: Moving violation: AKxiZeroDark from yasmp distance (0.0, 0.0, 0.0)</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload