Jul 8, 2009, 1:31 AM
Post #3 of 5
Now I'll try to explain my question further,
Re: [vikas.deep] Measuring the performance of a regex
[In reply to]
If I have input records of the following form,
Field1:my value1 Field2:new value2 Field3:more value3 Field4:test value4
and I only need to get the values of Field1 and Field4.
If I use the regex
/^Field1:(.*) Field2:.* Field3:.* Field4:(.*)$/,
What are the no of comparisons for my input string (above) ?
Is there any better regex I can use?
Note: Assume that the values for fields in the input records will not contain the name "Field" in them.