Regex(@"[_A-Za-z]+[A-Za-z]\w*") Can it be improved ?
-
-
Once again, what does this expression DO? Smaller and faster is directly influenced by the quality of the data that this expression is supposed to parse. If the incoming data is tight and follows formatting rules properly, then you can probably relax the expression a bit. But if the data is messy, your expression is going to have to be written to deal with that mess. So, unless you get more specific about what this expression is supposed to do and with what quality of data, there's nothing we can do to help you. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Once again, what does this expression DO? Smaller and faster is directly influenced by the quality of the data that this expression is supposed to parse. If the incoming data is tight and follows formatting rules properly, then you can probably relax the expression a bit. But if the data is messy, your expression is going to have to be written to deal with that mess. So, unless you get more specific about what this expression is supposed to do and with what quality of data, there's nothing we can do to help you. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
In that case, no, it can't be done any quicker. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome