I have a new perl problem, that I haven't quite figured out the Regular Expression for. We have a web based form that submits data in paragraph form with variables from the form entered into it. A typical set of data may look like this.
Patron @FirstName@ @LastName@ has filled out the @FormName@ form. Plea
+se send them an email at @EmailAddress@.
Where FirstName, LastName, FormName, and EmailAddress are the actual values, not the variable names. What I need to do, is highlight each of those variables by placing a
<B> after the first "@" and a
</B> before the second "@", in each one of those variables (without removing the "@").
Best I can come up with is going through the string one character at a time, and watching which "@" I am on. There has got to be a better way to perform this. Iterating over the whole string like that seems sloppy.