Re: [Evolution] Multi Line Regex Questions

2021-07-12 Thread Milan Crha via evolution-list
On Fri, 2021-07-09 at 15:11 +0200, Matt Kettlewell via evolution-list
wrote:
> I basically have some HTML in a message that looks something like
> this:
> 
>    BEGIN:=20

Hi,
just a note, what you see in the message source is encoded in quoted-
printable, your filter will not receive "=20", but " " (a space)
instead.

> I've tried various iterations of regex, but I think I'm bumping up
> against Evolution using ERE and not PCRE

I cannot speak much about this, I'm sorry. The code seems to use the
extended regular expression. I do not see the `regcomp` function having
any flag for the PCRE, it knows only basic and extended regular
expressions. The GLib's Regex implementation seems to be built on top
of the PCRE, though it's not used in this part of the libcamel, which
is included in the evolution-data-server project.

> I do see that there are other options for filtering, such as the free
> form expression ( as documented in this bugzilla
> comment: https://bugzilla.gnome.org/show_bug.cgi?id=550796#c10 ),
> however, it's unclear to me if that's going to help me
> here or not... 

The Free Form Expression is just an easier way of writing conditions,
instead of using the GUI for it. It uses the same code in the
background.
Bye,
Milan

___
evolution-list mailing list
evolution-list@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list


[Evolution] Multi Line Regex Questions

2021-07-09 Thread Matt Kettlewell via evolution-list
Hello - 

I'm trying to figure out the correct way to utilize regex for a multiline 
conditional filter... 

I basically have some HTML in a message that looks something like this:

   BEGIN:=20
END =20


I've tried various iterations of regex, but I think I'm bumping up against 
Evolution using ERE and not PCRE

ie, this works:
   grep -Pz "BEGIN:[\s\S]*END" evo_test.txt 

but this doesn't:
   grep -Ez "BEGIN:[\s\S]*END" evo_test.txt 

Perhaps there's a way using ERE that I'm not aware of... 

I do see that there are other options for filtering, such as the free form 
expression ( as documented in this bugzilla
comment: https://bugzilla.gnome.org/show_bug.cgi?id=550796#c10 ), however, it's 
unclear to me if that's going to help me
here or not... I'll keep playing with it, I suspect that's the direction I need 
to go in for this

I'm sure this has been encountered before, so any pointers in the right 
direction would be uber appreciated.

Thanks

Matt
___
evolution-list mailing list
evolution-list@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-list