"Dr.Ruud" writes:
> Harry Putnam wrote:
>
>> my $date_re = qr/^Date:/;
>> my $other_re = qr/^Date: some date/;
>>
>> if (/$date_re/ !~ /$other_re/){
>
> That code is bizar!
>
> What exactly do you want to compare?
> 1. Whether both matches succeed in the same way?
> 2. Whether both regexps contai
Harry Putnam wrote:
my $date_re = qr/^Date:/;
my $other_re = qr/^Date: some date/;
if (/$date_re/ !~ /$other_re/){
That code is bizar!
What exactly do you want to compare?
1. Whether both matches succeed in the same way?
2. Whether both regexps contain similar code?
3. none of the above
--
Jim Gibson writes:
[...]
> You don't need to compare regular expressions. If you did, then you would
> use the 'eq' operator on the strings that generate the regular expressions.
> However, that is unreliable, as two strings can generate the same effective
> pattern, as, for example, 'a?' is equ
On 10/28/09 Wed Oct 28, 2009 10:43 AM, "Harry Putnam"
scribbled:
> Jim Gibson writes:
>
>> We need to know what you are trying to accomplish here.
>
> Its over 300 lines of code at this writing.
Well we definitely do not want to see all 300 lines. However, some sample
input data and the act
Jim Gibson writes:
> We need to know what you are trying to accomplish here.
Its over 300 lines of code at this writing.
Where the re come in:
The program searches only headers for a given RE, but it also returns
the date line in any messages where the RE hits pay dirt.
The search RE is set
On 10/28/09 Wed Oct 28, 2009 9:37 AM, "Harry Putnam"
scribbled:
>
> What follows is snippet out of a more complex script and reworked to
> simplify but still not seeing what causes the problem.
>
> I'm not sure if I've just stared at it too long or what. When I run it
> I get this error:
>