Page 1 of 1

Filter by Field 2 - RegExp Syntax

PostPosted: Sat Feb 09, 2008 3:45 pm
by Dale Ray
I have this:
Code: Select all
if ($Subject =~ m/travel/i) {
rest of style
</If>


to limit the profile to items that have the word travel in the subject.

What is the exact syntax to do this with Filter by Field 2.1?

Yes I searched and I tried various things before using perl code.

And the style above is obviously not complete, I posted just enough to demonstrate what I need to know.

Examples posted here for use with Filter by field will be posted on Coranto Docs.

How about:

Include items with search term (my request above)
Exclude items with search term

for a start.

Thanks.

Re: Filter by Field 2 - RegExp Syntax

PostPosted: Wed Feb 20, 2008 3:01 pm
by Parahead
Hello Dale,

if you currently use m/travel/i as the regexp in your style, you should be able to set the Test Type in the profile to "Equal To RegExp" and set the test value to "/travel/i".

Re: Filter by Field 2 - RegExp Syntax

PostPosted: Wed Feb 20, 2008 7:59 pm
by Dale Ray
Parahead wrote:Hello Dale,

if you currently use m/travel/i as the regexp in your style, you should be able to set the Test Type in the profile to "Equal To RegExp" and set the test value to "/travel/i".


Hi Parahead,

Good to see you drop in and thanks for the help.

Hope things are going well in your part of the world.

Re: Filter by Field 2 - RegExp Syntax

PostPosted: Thu Feb 21, 2008 3:10 pm
by Parahead
Dale Ray wrote:Hi Parahead,

Good to see you drop in and thanks for the help.

Hope things are going well in your part of the world.
Hi Dale,
nice to see you and some others of the old school still being around. Yes, things are moving along fine in my part of the world. Life changes but I still don't have time to contribute to Coranto as I once did...

I hope my suggestion solved your problem as well?

Re: Filter by Field 2 - RegExp Syntax

PostPosted: Thu Feb 21, 2008 5:22 pm
by Dale Ray
Parahead wrote:I hope my suggestion solved your problem as well?


I will check it out later, when time permits.

Thanks again.