Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try this out. Works like a beauty for me:</p> <pre><code>((?&lt;=key[0-9]?=)[^\s]*(\s|$))+ </code></pre> <p><code>(?&lt;=regex)</code> is a zero-width (non-consuming) look-behind. This ensures that the value is preceded by <code>key[0-9]?=</code>. You can adjust the <code>[0-9]</code> to suit your exact needs, but the <code>?</code> make that digit optional anyways. The value part is matching anything that is <strong>not</strong> a space: <code>[^\s]</code>. It keeps consuming, <code>*</code>, and terminates the value when it finds a space or end-of-string <code>(\s|$)</code>.</p> <hr> <h2>Update</h2> <p>I started looking at the blob of data you gave as what you're actually searching over and modified the expression thus:</p> <pre><code>([^\s]+)=(.+?(?=([^\s]+=|$))) </code></pre> <p>Works great on the header data you provided (if you're copy/pasting into a tester, remember to remove the hard returns).</p> <p>Matches:</p> <p><code>Url</code>,<code>/flash/56553550_hi.mp4</code></p> <p><code>Log</code>,<code>SESSIONSTART [16/Dec/2010:13:44:17 +0000] flash/56553550_hi.mp4 0 192.168.20.31 1 [16/Dec/2010:13:44:17 +0000] 0 0 0 [0 No Error] [0 No Error [rtmp://helix.pete.videolibraryserver.com/flash/56553550_hi.mp4]</code></p> <p><em><strong>To not match the key</strong> (only the value):</em></p> <pre><code>[^\s]+=(.+?(?=([^\s]+=|$))) </code></pre> <hr> <p><strong><a href="http://www.regular-expressions.info/reference.html" rel="nofollow">RegEx Reference</a></strong></p> <p><a href="http://regexlib.com/RETester.aspx" rel="nofollow"><strong>RegEx Tester</strong></a></p>
 

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