
29 Apr
2003
29 Apr
'03
11:16 a.m.
Here's a question I can't answer. I'm using regexp to dig out strings from data received via Ham Radio, so the txt often is corrupted.
What I want to match is two consecutive callsigns separated by whitespace, for example 'hb9drv hb9drv' but not 'hb9drv hb9drX'.
I can define the match condition for a callsign, but can I use the match option {2,3} somehow to match the same callsign two or three times? Effectively match the same word two or three times?
Help received with much thanks,
How about: (\w+)(?:\s+$1)+ John.