I need your help with extracting correct email with a regular expression. Here is a raw HTML:
</a>
<script>
var XutJPVbvZ = 'sales@some##thing.com';
var XutJPVbvZ = XutJPVbvZ.split('#');
document.getElementById('XutJPVbvZ').innerHTML =
XutJPVbvZ[0]+XutJPVbvZ[2]+XutJPVbvZ[1];
document.getElementById('XutJPVbvZ').href =
'mailto:'+XutJPVbvZ[0]+XutJPVbvZ[2]+XutJPVbvZ[1];
</script>
</div>
I match an email with this expression:
[a-zA-Z0-9-_.]+@[a-zA-Z0-9-_.]+[a-zA-Z]+[a-zA-Z0-9-_.]+
What I get is this: sales@some##thing.com
How to make regex return an email without two # special characters in the middle of this email address?
Thanks
I do not fully get your question but can answer anyway: use regex replace with capturing groups like shown in the Javascript code below: