Regular Expressions in MarcEdit
Using Regular Expressions in MarcEditor Replacement Functions:
Regular Expressions can now be utilized in the Replace and Edit Subfield functions in the MarcEditor.
This allows users to create complex search and replacement functions. In general, MarcEdit’s Regular Expression implemention is fairly straightforward. First, MarcEdit uses a replace/with structure, meaning that the regular expression must be broken into a pattern and a replacement argument. Second, MarcEdit’s implementation is slightly different from the traditional unix greg implementation. For example, if there was a field containing the following data:
aaabbb
And the user wanted the final output to look like:
aaabxxbb
In Unix, one might use the following regular expression:
/ab/ xx/
Using the Replace Function, this same expression would be written like :
In the Find Text Textbox: ab
In the Replace With Textbox: