However if you are doing a straight up Text Sequence Match ( which is what the example code is doing )
then you would use the .IndexOf method off the string object.
Of Course Im probably missing the point.. but you used the term Real World up there...
In Main, make the following change...
Comment : Regex regexpr = new Regex(matchthis.ToString(), RegexOptions.Compiled);
Comment : Boolean b = regexpr.IsMatch(_doc);
Replace : if (B) with : if ( _doc.IndexOf( matchthis.ToString()) > -1 )
When reRun, with no other changes, causes an end number of approximately ".NET regex took 1687 miliseconds"
Would be interested in seeing the Java equivalent change + perf.
With the understanding that a implementation .IndexOf Java equivalent will probably be significantly different then .net
However if you are doing a straight up Text Sequence Match ( which is what the example code is doing ) then you would use the .IndexOf method off the string object.
Of Course Im probably missing the point.. but you used the term Real World up there...
In Main, make the following change...
Comment : Regex regexpr = new Regex(matchthis.ToString(), RegexOptions.Compiled);
Comment : Boolean b = regexpr.IsMatch(_doc);
Replace : if (B) with : if ( _doc.IndexOf( matchthis.ToString()) > -1 )
When reRun, with no other changes, causes an end number of approximately ".NET regex took 1687 miliseconds"
Would be interested in seeing the Java equivalent change + perf. With the understanding that a implementation .IndexOf Java equivalent will probably be significantly different then .net
.Net version was 1.1