Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    RegExp that would pull out the YEAR information from the 260

    • Article Type: General
    • Product: MetaLib
    • Product Version:

    Description:
    We would like to include a RegExp that would pull out the YEAR information from the 260$c tag, stripping away the "c" and the ending punctuation for our local resource.
    Below are the different combinations for the following potential data strings:

    260 |c 2001. => Should parse as "2001"
    260 |c 1987, c1986. => Should parse as "1987, 1986" [example title with this string: Dictionary of wars / George C. Kohn.]
    260 |c c1997-1998. => Should parse as "1997-1998"
    260 |c 1998] => Should parse as "1998"
    260 |c [2001] => Should parse as "[2001]
    260 |c 1998?] => Should parse as "1998?]"
    260 |c 2000] => Should parse as "2000]"

    Resolution:
    MetaLib's YR field is not a regular MARC field.
    It is designed to ONLY hold 4 characters, i.e. 4 digits that compose a year.
    It may include an additional character for the "c" circa prefix, but not combined years such as 1996-1997.
    Please try the following regular expression:
    260## c RegExp YR,a,P/(\[?\d{4}\]?)/ ADDNEW
    If this doesn't work, try removing the "\" before "[" and "]".


    • Article last edited: 10/8/2013