Treat IP address as string in custom macro and match

Maybe check out this thread Groups based in IP addresses