I am not familiar with C# so I will describe the regex.
Method 1:
You are basically looking for this:
(\b[^\s]+\b){1,250}
In java:
\s
is any whitespace character.
[^\s]+
is a sequence of non-whitespace characters.
\b
is a word boundary.
You can translate the regex to C#.
Method 2:
Tokenize the input text into whitespace delimited words. In java, this is done by:
String[] tokens = inputString.split("\\s+");
where the regex is \s+
Now you can count the length of the array and implement your logic to reject the words beyond 250.
Method 3:
Define a pattern to capture whitespace as a 'capturing group'.
(\s+)
Now you can do a count the number of matches in your pattern matcher using a while loop. This is essentially kinda same as Method 2 but without involving the creation of the array of tokens.