Is there an easier way to truncate a string with PHP regex?
<p>I have a string that looks like the following:</p>

<pre><code>Security/Flow_Setup/Steady_State/Verification
</code></pre>

<p>I only need the first two levels (e.g. <strong>Security/Flow_Setup</strong>) Is there an easier way to get this.  Currently I explode the string into an array using: '/' as a delimiter and then piece together elements 0 and 1.</p>

<p>This works but I was hoping for a more elegant solution.</p>

<p>Any thoughts?</p>
