 <p>Use the String.Split function, as others have suggested. This will split your string into an array of strings. Then, identify which string in the array is the 'vs' string. Take the value of the index prior to 'vs' and after 'vs'. For example:</p> <pre><code>string input = "Which teams have faced eachother? - use Red vs Blue format"; string[] inputArray = input.Split( ' ' ); int vsLocation = 0; for ( int i = 0; i &lt; inputArray.Length; i++ ) { if ( inputArray[i] == "vs" ) { vsLocation = i; break; } } if ( vsLocation &gt; 0) { string team1 = inputArray[vsLocation - 1]; string team2 = inputArray[vsLocation + 1]; } </code></pre>