if ( !txtRegSteamID.Text.StartsWith( "0:0" ) || !txtRegSteamID.Text.StartsWith( "0:1" ) ) { MessageBox.Show( "Incorrect SteamID format" ); return; } input is "0:0:12112"