I'm pretty unfamiliar with regex. I would like to run a regex search against lines like:
if env == production
#define DBHOST "serv1.ns.com"
#define DBSLAVEHOST "serv2.ns.com"
#define DBHOSTAUX "serv3.ns.com"
endif
I have the following which finds the lines I want: ^(?=.*\\bDB)(?=.*HOST).*, but I'm not positive how to match and return whatever the last word in the line is -- i.e., serv1.ns.com, serv2.ns.com, serv3.ns.com