I try to match a string in this format:
Fixed sentence http://t.co/variable_part fixed_word @fixed_word
the only unknown part in this string is variable_part, the rest is fixed. So I use:
Fixed sentence http://t.co/([A-Za-z0-9\-]+) fixed_word @fixed_word
as the match pattern. Altough it works well in some online parsers, not in some .NET based online parsers (like http://regexlib.com/RETester.aspx?AspxAutoDetectCookieSupport=1) and in my .NET code. What am I missing?
You are missing the underscore in the character class
I changed the class and used
\wthats including letters, digits and the underscore (in .net letters and digits are of course unicode letters and digits, not only ASCII, but since you want to match any word …)