PATTERN MATCHING - Using Wildcards
The data retrieval system (SQL) used
by Winlog32 can employ comprehensive pattern matching for searches on all text (string) fields
Many of the search and update functions used with the databases use built-in pattern matching.
An understanding of the basics of pattern matching can be useful to obtain more specific results from your log searches.
The following examples use the Search Callsign mini window to
demonstrate how pattern matching can be applied to this search facility to fetch more specific callsigns from the Log.
The wildcard character "*" (asterisk) is widely used for pattern
matching and "*" used on it's own in a callsign search will return all callsigns from the Log.
A wildcard inserted into text can filter more specific results,
Example:
|
G0*
|
finds all G0's from the Log,
|
Example:
|
*/P
|
finds all portable stations
|
Example:
|
*4*
|
finds all calls with a number four in the callsign.
|
Although the wildcard can be very useful, more defined and specific searches
can be carried out using other pattern matching characters and techniques.
The following examples demonstrate how to filter using various pattern matching characters.
N.B. In these examples the square brackets [] are used to enclose a number/character range that is greater
than a single character.
Example:
|
G[1,7]*
|
finds G1 and G7 callsigns only.
|
Example:
|
G?[1-8]*/P
|
finds G1 to G8 portables, including GM, GW etc., but NOT with zero in the prefix:
|
Example:
|
G?[!0]*/P
|
as above. using the exclusion character "!" before the number to be excluded.
|
Example:
|
SP[1-9]*
|
finds SP callsigns but NOT SP0:
|
Example:
|
SP[1-3,7,8]*
|
finds SP callsigns with areas 1,2,3,4,7,8 excluding others.
|
Example:
|
S[K,M][5,0]*
|
finds SK and SM callsigns in areas 5 and 0.
|
Example:
|
G[M,W][3-6]*/P
|
finds GM3,4,5,6 & GW3,4,5,6 portables.
|
Example:
|
[K,N,W]*6*/M
|
finds USA stations in area 6 mobile:
|
Example:
|
[K,N,W]*[!6]*
|
finds USA stations but NOT those in area 6.
|
N.B. The exclusion character "!" should be inserted before the number to be excluded.
The opportunities are endless!
The examples above show how pattern matching can be applied to the
Callsign Search but the same criteria can be used in all SQL text based searches on the Log and other databases..
Numeric and date data type fields can NOT use pattern matching, however SQL can manipulate numbers and dates using other methods.
The Date field is a 'Date' data type and the 'Band' field is a numeric data type in Winlog32, other fields are 'Text'
data types and pattern matching can be used on these.
|