Page 1 of 1

What are your regular expressions ?

Posted: 08 Jan 2017, 17:26
by PE5TT
I know that regular expressions are a very powerful filter and selection language, However i am not a powerful regular expressions wizard.

But i made an effort to make one for SES (Special event stations) , its far form perfect and i would like to invite anyone to help and fine-tune it.

((SES)|(ses)|(SPECIAL)|(special))|(([A-Z]{2,4})([0-9]{2,4})([A-Z][\s]|[A-Z]{3,6})|([A-Z]{1,4})([0-9]{1,4})[A-Z]{4,6})

Most special event stations are captured, however due to the frequent use of locator coordinates (XX00XX) SES stations using this call-sign format are excluded as this would make a lot of false triggers.

____________
And while i am at it, i made a small adjustment to the IOTA expression to prevent false positives for call-sign starting with a continent (EU,NA and so)

(AF|EU|AS|OC|NA|SA|AN|af|eu|as|oc|na|sa|an])((-|\s)?)([0-9]{2,4})|((iota)|(IOTA))

Now at least 2 numbers are required before the IOTA flag is triggered , so EU1RUS will no longer trigger the IOTA flag, but EU01 will.

Re: What are your regular expressions ?

Posted: 09 Jan 2017, 08:38
by G4POP
Thanks for the input we will update the IOTA Regex and look at the special event Regex

Re: What are your regular expressions ?

Posted: 10 Jan 2017, 18:05
by PE5TT
I wish i was a regular expression guru, then i could probably half the length of the definition below, but i am not.

Some Special Event Stations where missed by the previous version. So now an updated one. Seems to be working quiet well missing only few and also few false positive's.

((SES)|(ses)|(SPECIAL)|(special))|([A-Z]{3,6}[0-9]{1,6}[A-Z]{1,6}\b)|([A-Z]{1,6}[0-9]{3,6}[A-Z]{1,6}\b)|([A-Z]{1,6}[0-9][0-9][A-Z]{3,6}\b)|([A-Z]{1,6}[0-9]{1,6}[A-Z]{4,6}\b)

Wonder if there are any (speed) drawbacks in using such long expressions ?

Re: What are your regular expressions ?

Posted: 11 Jan 2017, 14:02
by IW3HMH
No performance issues.
each time you write a character on the callsign field a check on 300 regular expressions is made to find the country...

Re: What are your regular expressions ?

Posted: 11 Jan 2017, 18:52
by PE5TT
That's nice to hear. Got another question. it seems like only the "DX CALLSIGN" and the "NOTES" fields are routed trough the regular expression engine.

I am unable for example to highlight certain frequency or band or spotter callsign or anything else. As i am also active on VHF i am trying to get these spots highlighted, since they scarce en could be easily overlooked.

A workaround is a simple Propagation filter tough, witch catches spots with propagation information. As they are mainly VHF / UHF spots

This line will highlights any spots with <TR> Tropo, <ES> Sporadic-E, <MS> Meteor Scatter, <AU> Aurora

((<tr>)|(<TR>)|(<es>)|(<ES>)|(<ms>)|(<MS>)|(<au>)|(<AU>))

One could also add <SAT> and or <EME> , that however is not in my field of interest