View Single Post
Old 03-11-2019, 11:13 AM   #12
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,695
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
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.

Last edited by DiapDealer; 03-11-2019 at 11:16 AM.
DiapDealer is offline   Reply With Quote