MARC Global: Data Occ problem

In recent versions, the behavior of this option has been somewhat erratic. The default setting for this in MARC GLobal is 'First', and yet, it many cases, a review that contained a regular expression would not work consistently unless the option was set to 'All'.

The fix for this is quite simple. The Data Occ option will now be disabled when the regular expression option is selected. PCRE has its own mechanism for dealing with repetition in a pattern, and so, if there is a need to specify a particular occurrence of a pattern to be replaced, then that specification should be performed in the regular expression itself1).

A good thing about this fix is that it requires no changes to saved reviews. Now, when you load a 'Change Data' review that contains a regular expression, the program will turn off any code that references the Data Occurrence parameter in the saved review.

1)
If you need help with this, please send me an email with an example of what you need to do
239/mg_data_occ.txt · Last modified: 2021/12/29 16:21 (external edit)
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki