Use region for string matching to avoid nested "#"