Refined the regex to include start/end characters