Page 1 of 1

Using regexp on Awards

Posted: 25 May 2021, 22:06
by cx8fs
Hello, I would like to raise a problem that I have.
I have searched the forum and the closest thing I have found is this version 1 (https://forum.log4om.com/viewtopic.php?t=1107) but it does not clarify my situation.
And googling, I have not found references to the award settings the way I need to use it.
My setup is LOG4OM V2.10.0.0 on W10 20H2.

I am trying to generate a new award using the regex option in "References".
The point is that I must filter by the fourth character in the callsign field.
I have built the expression ^ (CX [0-9] F) (. *) $, But it doesn't work.
The logic should be, start with "CX", then a decimal digit and then the letter "F", what comes next doesn't matter.

It validates any feature that has an "F" after the number, so it validates CX8FS, CX8SF, CX8SSF, etc ..

I have validated it using this site (https://regex101.com/), but it doesn't behave the same in LOG4OM.

Must say I haven't experience using regular expressions, maybe someone in this forum has experience with it.

Any help will be appreciated.

Kind regards
Claudio - CX8FS

Re: Using regexp on Awards

Posted: 26 May 2021, 09:21
by HB9BRJ
cx8fs wrote: 25 May 2021, 22:06 I have built the expression ^ (CX [0-9] F) (. *) $, But it doesn't work.
The logic should be, start with "CX", then a decimal digit and then the letter "F", what comes next doesn't matter.
No spaces in RegEx. Try ^CX\dF
\d stands for a single digit. Everything that doesn't matter you don't have to specify.

73, Markus HB9BRJ

Re: Using regexp on Awards

Posted: 26 May 2021, 12:16
by cx8fs
Thanks Markus,

With ^CX\dF(.*)$ work as expected.

I tried also to search one of three letters but doesn't work using the reference on screen.
Ex. ^CX\dA|B|C(.*)$ or ^CX\d(A|B|C)(.*)$ or using [A-C]

To test, I used the reference on screen and doesn't work ^(.*)(F)(.*)$
It seems to be a problem with capturing groups.

Now I'm using 2.13.0.0

73
Claudio
CX8FS