I'm trying to do a replace on the following string prototype: "I‘m singing & dancing in the rain."
The following regular expression matches the instance properly, but also captures the character following the instance of &
. "(&)[#?a-zA-Z0-9;]"
captures the following string from the above prototype: "&l"
.
How can I limit it to only capture the &
?
Edit: I should add that I don't want to match "&"
by itself.