B
Bill Cohagan
I have an app where I'll be using Regular Expression substitution to make
some changes in an HTML file. In particular I'm adding STYLE attributes to
selected TEXTAREA and INPUT elements. In addition to this however I need to
add an ID attribute which of course must be unique.
So, the problem is, how can I create the ID values to be used during the RE
substitution? The only constraint is that the ID values must be unique and
of course must satisfy the HTML syntax for such values. A GUID would work
nicely for instance. My impression is that this can't be done using just RE
substitution, although obviously it can be done if the RE is being run under
control of a .Net application that gets control back after each hit. I'd
prefer not to do that however.
Does the .Net implementation of RE provide any mechanism that I might use to
accomplish this?
TIA,
Bill
PS - "gensym" is from the Lisp function that does exactly what I need.
some changes in an HTML file. In particular I'm adding STYLE attributes to
selected TEXTAREA and INPUT elements. In addition to this however I need to
add an ID attribute which of course must be unique.
So, the problem is, how can I create the ID values to be used during the RE
substitution? The only constraint is that the ID values must be unique and
of course must satisfy the HTML syntax for such values. A GUID would work
nicely for instance. My impression is that this can't be done using just RE
substitution, although obviously it can be done if the RE is being run under
control of a .Net application that gets control back after each hit. I'd
prefer not to do that however.
Does the .Net implementation of RE provide any mechanism that I might use to
accomplish this?
TIA,
Bill
PS - "gensym" is from the Lisp function that does exactly what I need.