I'm trying to work out a regular expression to deal with monitor resolutions but I'm a bit stuck. The expression should allow any number of digits, then any number of spaces, then an x or an X then any number of spaces and then any number or digits. As it stands I have this...
[0-9\ ]+(x|X)[0-9\ ]+
This is for a Regex in C#. The problem with this is that it still allows letters either before or after the numbers but not either side of the x. The possibilities I'm after are like...
1280 x 1024
1280 X 1024
That kind of thing.