Hi everyone. My name is Bree and I am TERRIBLE at Regular Expressions. I have a problem that I am not sure how to solve so I came here. I reviewed the Library and didn't find exactly what I needed and didn't know how to modify what I did find to work. So you all are experts let me tell you what I want to do and maybe you can steer me in the right direction.
First off I know that I am trying to do something RegEx was NOT designed to do. But we always push the envelope, don't we?? :-))
I am reading a log file with Perl. I am trying to find any pattern that matches the string D<space><6 character alpha string><space><up to 3 digits><dot><4 digits> where the D is present and the <up to 3 digits> is between say 3 and 120. In some cases (new regex pattern) the 3 might be 4 or some other integer greater than 0.
The conditional numeric comparison is of course the problem. I think it can be done with the RegEx conditional operator ? which is recognized by Perl. I saw some comparisons in the library but they always used 0 as the start. That doesn't work for me. I need various non-zero thresholds such as 3. There may or may not be a digit in the hundreds or tens place or even in the single digit place. But there will always be a decimal and trailing digits. I don't really care about those. I really only care about digits in front of the decimal.
Can you guys and gals help?? If so please post here or email me your idea at breeliz@verizon.net.
Thank you so much!!!
Bree
Thx!
Bree