It's possible, and probably the easiest way - though it may not seem like it - is to use a Regex:
string message = "My ticket number is : 1005";
int value;
Match m = Regex.Match(message, @"\d+");
if (m.Success)
{
value = int.Parse(m.Value);
Console.WriteLine(value * 2);
}
The string
\d+
is a regular expression for "a sequence of digits".