Limit output of "print" command

Hello!

I have two providers with BGP routing and receive about 800,000 routes. I want (for example) to see all the routes to the address 212.122.1.2 but this address goes into a large subnet, besides different providers in different ways, these networks announce as 212.122.0.0/20 or 212.122.1.0/24 at different providers.

How can I see all routes in the network starting with “212.122.”? Command “ip route print where dst-address =” only works with the exact address of the route (for example ip route print where dst-address =212.122.0.0/20). The manual did not find an answer to this question.

Thank you

http://wiki.mikrotik.com/wiki/API#Command_description

That is the standard means mikrotik do not allow to do this? We need to create a third-party program?

Use regular expressions to do what you want. http://wiki.mikrotik.com/wiki/Scripting#Other_Operators

For example, this prints entries that contain “212.122.”

/ip route print where dst-address~"212.122."

I’ll have to brush up on my regex to see how to only show ones that start with that…

It only works for very long processes.
Thanks

Try this to find ones the start with"212.122."

/ip route print where dst-address~"^212.122."