You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks a million for this.
Regular expressions for different DXCC entities do not always seem to be exclusive.
For instance, the Sardinian call sign IS0HNX would be matched, not only by the general Italy expression ^I[A-Z0-9/]$, code 248, but also by a specific Sardinia general expression: ^I[SM]0[A-Z0-9/]$, code 225. Is there any way to order the expressions so that these ambiguities are avoided? Thanks and 73
The text was updated successfully, but these errors were encountered:
Hi Mikel: yes, this is a weakness of the current dataset. As a heuristic, I can attempt to order them by descending length of the regular expression, which should be good enough for most cases. As a workaround, that should also be simple to accomplish in programs consuming the data.
If you (or anyone else) is interested in trying to tighten up the regular expressions so that general matches (e.g. Italy) do not overlap with more specific ones (e.g. Sardinia) I'm happy to accept a pull request.
Hi folks, found a workaround for this issue. Is not a perfet solution, even though it should work for almost every search without needing to re-write every single regex pattern.
In summary, after pattern matching succeedes I'm also checking if the given callsign begins with one of the prefixes.
Hope you guys could find it useful.
73s
Thanks a million for this.
Regular expressions for different DXCC entities do not always seem to be exclusive.
For instance, the Sardinian call sign IS0HNX would be matched, not only by the general Italy expression ^I[A-Z0-9/]$, code 248, but also by a specific Sardinia general expression: ^I[SM]0[A-Z0-9/]$, code 225. Is there any way to order the expressions so that these ambiguities are avoided? Thanks and 73
The text was updated successfully, but these errors were encountered: