Add ^$ metasymbols for begin and end of matched string.