Sorry if this question is a duplicate of another ones, I couldn't find it :-/
Hey guys, I am guessing it's a simple regexp question but help me out will you? Regexps are always look so complicated to me :-)
in this example :
@2 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sit amet quam ante, sit amet consectetur ante. Ut non urna in quam adipiscing consectetur et sed lorem. Donec venenatis vehicula porttitor.
I want to convert @2 to
<a href="#2">@2</a>
but user may type it like "@2Lorem.." without space or it may be @38427. how can i grab '@' symbol and numbers after it and convert to anchor?
Edit: and also @ may be in the middle of text it may not always be in beginning.