note
AnomalousMonk
<p>
I agree with matching against a particular field rather than against the entire string, and with using a character class rather than several <del>regexes </DEL><ins>| matches</INS> in tandem.
</P>
<p>
I have some comments regarding implementation details. I'm forced to admit, however, that because I don't really know [DAN0207]'s requirements, these comments may be meaningless. That said, I forge ahead.
</P>
<p>
Firstly, the <c> /SMS[1HI]/i </C> match against the extracted <c>$SMSfield</C> field allows a field like <c>'xSMSIx'</C> to be accepted. This match could benefit from anchor assertions: <c> / \A SMS [1HI] \z /xi </C> rejects this field.
</P>
<p>
Secondly, I find the use of the global <c> /i </C> flag problematic. In the [id://11118553|OPed] code statement <br>
<c> $$blk_ref = 'SMSblk' if $$blk_ref =~ /SMSi/i || ... || $$blk_ref =~ /SMS1/;</c> <br>
the <c> /i </C> modifier is only present in matches with an <c> i I h H </C> suffix, not with the numeric suffix. This suggests (and again, I'm only guessing) that the <c>'SMS'</C> subfield of the field in question should not be matched case-insensitively. If that's so, a match of <br>
<c> / \A SMS [1hHiI] \z /x </C> <br>
(which I personally prefer) or <br>
<c> / \A SMS (?i) [1HI] \z /x </C> <br>
will reject the <c>'SmsI'</C> field and all like it.
</P>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-634253">
<hr><p>Give a man a fish<b>:</B> <c> <%-{-{-{-<</C></P>
</div></div>
11118553
11118610