How can I check if a string has two words with a hyphen between them?
<p>I have the following code:</p>

<pre><code>var hyphens = myString.Split('-');
topTitle = hyphens[0].Replace("_", " ");
subTitle = hyphens[1].Replace("_", " ");
</code></pre>

<p>This is working but if myString does not have two words with a hyphen between them I get an error. How can I make it such that if the myString contains only one word then topTitle gets that word and subTitle gets "n/a"?</p>
