Community discussions

MikroTik App
 
trmckee3
just joined
Topic Author
Posts: 11
Joined: Mon Nov 27, 2017 9:31 pm
Location: US, NC, Charlotte
Contact:

Route Filter syntax for 'find'

Thu Mar 30, 2023 8:26 pm

Does anyone know the proper syntax in routing filters for using 'find' to match a string in the comment would be?? I'm trying to use this to mark static routes for redistribution...

I've tried most derivatives of:
if (find "*BGP Advertise" comment) {accept}

Thanks,

Tim
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7044
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Route Filter syntax for 'find'

Thu Mar 30, 2023 9:11 pm

rule="if ( comment find your_string ) {}"

or

rule="if ( comment regexp your_regexp ) {}"
 
trmckee3
just joined
Topic Author
Posts: 11
Joined: Mon Nov 27, 2017 9:31 pm
Location: US, NC, Charlotte
Contact:

Re: Route Filter syntax for 'find'

Thu Mar 30, 2023 9:39 pm

thank you... I must have tried every other combination.... This needs to go in the documentation, a simple example would do.

Who is online

Users browsing this forum: jerryuser and 22 guests