Try the following regex:
/zone\s+"([^"]+)".+masters\s+{[\s#\/]*([a-zA-Z0-9.-]+)[\s#\/;]*}/s
In addition to accommodating for the # and / characters in the zone stanzas, it handles the ; at the end of the masters' IP/domain name.
The last character sets:
[\s#\/]*([a-zA-Z0-9.-]+)[\s#\/;]* ^ ^ ^ | | | | | + - Character set found immediately after I +P/domain name | + - Character set allowed in IP/domain name + - Character set found immediately before IP/domain name
In reply to Re^7: Bind zone file search
by Kenosis
in thread Bind zone file search
by ranceh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |