Actually, the only failure I experience with your F&R expressions is with the second sample match above:
Code:
<a id="">Anzil, sm Jacques d’</a>
According to your desired result:
Quote:
So for the identifier, I need to find the first word as the main ID and the first letter of the first word after the coma or if the coma doesn't exist, I need to find the next uppercase letter for it.
|
the above should produce:
Code:
<a id="Anzils">Anzil, sm Jacques d’</a>
but it in fact produces:
Code:
<a id="AnzilJ">Anzil, sm Jacques d’</a>
Everything else seems to produce your expected results.
Keep in mind that you probably shouldn't rely on this sort of thing to generate ids in the first place. If they're in the same document, anchor ids need to be unique. And there's no way any regexp F&R is going to be able to guarantee uniqueness when relying utterly upon the slicing/concatenation of strings present in the match.