I've just started learning regex
.
I need to match things like this:
hostname21.processName
The .
is the anchor. Pre and post anchor are represented by [a-zA-Z0-9_]
but I'm not sure how to match both of the conditions on either side of the anchor.
I'm using boost::regex
if that helps.
EDIT
I tried Jerry's code with boost::regex reg("[a-zA-Z0-9_]+\\.[a-zA-Z0-9_]+");
and it worked. Thanks everyone.