Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Regex vs IndexOf in Java.

OverviewThe author of these articles Are C# .Net Regular Expressions Fast Enough for You? and .Net Regex: Can Regular Expression Parsing be Faster than XmlDocument or Linq to Xml? recently pointed out to me that he had found that Regular expressions were at least as fast or faster than the alternatives in C#. However it has been my experience that regular expressions in Java were slower. It is hard for me to say why this might be different in Java and C# or even if these are fair comparisons but here is what I found in Java.Searching XML for the start of a fieldThis test searches for the exp...

6,121 0       JAVA REGULAR EXPRESSION EFFICIENCY INDEXOF