[librecat-dev] MARC, selecting a range of values

Patrick Hochstenbach Patrick.Hochstenbach at UGent.be
Thu Jul 8 12:45:10 CEST 2021


Right that should be:

select all_match(date,"\d{4}”)

> On 8 Jul 2021, at 12:41, Uldis Bojars <captsolo at gmail.com> wrote:
> 
> I am getting an error on the "reject unless ..." line:
> 
> Oops! Syntax error in your fixes...
> Error: Expected end of input on line 16 at:
> reject unless all_match(date,"\d{4}")
> ^
> 
> What could be wrong? If I comment this line out the code works OK.
> 
> Cheers,
> Uldis
> 
> 
> On Tue, 6 Jul 2021 at 16:08, Patrick Hochstenbach <Patrick.Hochstenbach at ugent.be> wrote:
> Something like this fix
> 
> marc_map(008/07-10,date)
> 
> reject unless all_match(date,”\d{4}”)
> 
> if less_than(date,1990)
>    reject()
> end
> 
> if greater_than(date,2000)
>    reject()
> end
> 
> > On 6 Jul 2021, at 13:18, Uldis Bojars <captsolo at gmail.com> wrote:
> > 
> > Hi,
> > 
> > Could you tell me how to select (keep) MARC records where the value extracted from a MARC field (in this case: 008/07-10) is in the given range of values (start and end years)?
> > 
> > Best regards,
> > Uldis
> > 
> > _______________________________________________
> > librecat-dev mailing list
> > - send list mails to librecat-dev at lists.uni-bielefeld.de
> > - to unsubscribe or change options, visit https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev
> > - project website: http://librecat.org/
> 




More information about the librecat-dev mailing list