
vpadiri
Novice
Jul 8, 2009, 1:31 AM
Post #3 of 5
(1852 views)
|
|
Re: [vikas.deep] Measuring the performance of a regex
[In reply to]
|
Can't Post
|
|
Now I'll try to explain my question further, 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. Thank you
|