Technical Services: Subject Portal Expressions for LC Ranges

Purpose: To explain the coding process used to scope new acquisitions by LCC call number for use by Subject Specialists who wish to deliver recent acquisitions to patrons by creating links to the legacy subject portal from current subject guides.

Background

Between 2000 and 2014, Fogler Library hosted subject guides locally through the use of the “Subject Portal.” In 2015, Subject Specialists adopted Springshare’s cloud-based, WYSIWYG LibGuide software. The portal transitioned into a legacy resource maintained only to deliver .asp pages listing recent acquisitions cataloged in URSUS.

The following are instructions for scoping new acquisitions by subject using LC numbers. Librarians are able to create links from LibGuide Subject Guides to new acquisition pages within the legacy portal site.

Single-Character Metacharacters

Items highlighted in blue are the characters we use most commonly for setting up our LCC ranges.

Symbol Description
. Matches any one character (single character wildcard)
[  ] Matches any character listed between the brackets (e.g. [0-9] means “any digit,” [0-4] means “0, 1, 2, 3, or 4”)
[^  ] Matches any character except those listed between the brackets (e.g. [^0-9] means “any character that is not a digit”)

Quantifiers

Symbol Description
? Matches any character zero or one times
* Matches the preceding element zero or more times
+ Matches the preceding element one or more times
{num} Matches the preceding element num times
{min,max} Matches the preceding element at least min times, but not more than max times

Anchors

Symbol Description
^ Matches at the beginning of the line

Alternation (“OR”)

Symbol Description
| A logical “or”

Special Combination

Symbol Description
.* All of the LC Ranges we set up end with a dot followed by an asterisk. This translates to “any combination of any characters.”

Constructing Regular Expressions

The Library of Congress Classification Outline is available online from the Library of Congress.

For our purposes, the regular expressions will always begin with ^ and end with .* such as ^RF.*, which means, “Starts with the letters RF followed by any combination of characters.” This expression would capture the entire RF range of call numbers. Most call number ranges are not this simple.

Examples:

Expression English Language Meaning LC Range 
^HB.* Starts with the letters HB HB
^H[B-D].* Starts with H followed by B, C, or D HB-HD
^HB(2-9)(0-9)(^0-9).* Starts with HB followed by 20 – 99 HB20-99
^SB(4[6][9]|4[7-9][0-9]|[5-9][0-9][0-9]).* Starts with SB 469 or 4 “7, 8 or 9” or “5, 6, 7, 8, 9”, Any digit, Any digit, Any combination of characters. SB469 – SB998

Questions may be directed to Deb Rollins, Head of Acquisitions.

Return to Technical Services Table of Contents.

Contact: um.library.technical.services@maine.edu   | Edited: 09/26/2022 kjs