EvilFreelancer / routeros-api-php

Mikrotik RouterOS API PHP client for your applications
https://mikrotik.com/software
MIT License
402 stars 149 forks source link

How to use regex in where #122

Open wartw opened 2 months ago

wartw commented 2 months ago

How to use regex in where I need to output all IP addresses containing pppoe_network card

EvilFreelancer commented 2 months ago

Hi! Operator ~ (like) can be used for filtering, you may try something like this:

$query->where('address', '~', 'pppoe_network');

UPD. I'm not sure if it's PCRE compatible, see this and this for details.