Welcome to WebmasterWorld Guest from 18.104.22.168
I need some help with writing a regex that will take ANY generic mailto link such as
and convert it into the same with an additional param added such as
I'd appreciate any help. Thanks,
Where are these mailto's coming from? Static pages, other sites? Your output? A message board?
What is the real task you hope to achieve? Adding a new parameter to all mailto's?
There is one *huge* issue here that may make all this just not worth your time. Mailto links work only if the user has, and uses, a default mail program on their computer. The browser "queries" the system for the default mail program, opens it, and opens a new email populating the to, subject, and even body fields.
What if I use Yahoo Mail,Gmail, msn, AOL web mail, and have never launched Outlook, as an increasing number of users do?
The system does the same thing, most likely opening Outlook Express, and the reaction by the user ranges from confusion to horror (OMG, it's a pop up, it's a virus, what is this, I've never seen this . . . )
See where that goes?
So tell us what your actual task is, we could offer a *real* solution.
One example: find those mailto:links and substitute out the whole wad to point to a contact form that will work for everyone.