You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -66,17 +68,17 @@ The Find and Replace tool is another useful way to identify and manipulate data
66
68
67
69
::::::::::::::::::::::::::::::::::::::: checklist
68
70
69
-
### Add a space between 090 class and subclass
71
+
### Add a space between 099 class and subclass
70
72
71
73
1. Select Edit → Find
72
-
2. Enter `=090` in the Find box and click Find All
73
-
Review the list of `090` fields, what observations can you make about the call numbers in this field?
74
+
2. Enter `=099` in the Find box and click Find All
75
+
Review the list of `099` fields, what observations can you make about the call numbers in this field?
74
76
Review shows us that not all call numbers begin with letters. We do not want to add a space to these call numbers and need to account for this in our regular expression.
75
77
3. In the Find window, click Replace to bring up the Replace Text functions
76
-
4. In the Find box enter the regular expression `(=090 \\\\\$a[A-Z]+)(\d.*)`
78
+
4. In the Find box enter the regular expression `(=099 \\\\\$a[A-Z]+)(\d.*)`
77
79
This regular expression uses two sets of `()` to capture groups and then manipulate them.
78
80
79
-
- Broken down, the first group `(=090 \\\\\$a[A-Z]+)` will match the literal string `=090 \\$a` (the additional backslashes are used to escape the regex metacharacters `\` and `$` so that they will be read as literals) followed by any single capital letter in the range A to Z (`[A-Z]`) one or more times (`+`). By specifying that the regular expression must locate a capital letter at the start of the call number, the regular expression will not edit the call numbers that begin with a digit.
81
+
- Broken down, the first group `(=099 \\\\\$a[A-Z]+)` will match the literal string `=099 \\$a` (the additional backslashes are used to escape the regex metacharacters `\` and `$` so that they will be read as literals) followed by any single capital letter in the range A to Z (`[A-Z]`) one or more times (`+`). By specifying that the regular expression must locate a capital letter at the start of the call number, the regular expression will not edit the call numbers that begin with a digit.
80
82
- The second group `(\d.*)` will match any digit (`\d`) followed by any character (`.`) zero or more times (`*`)
81
83
82
84
5. In the Replace box enter `$1 $2`
@@ -86,6 +88,15 @@ The Find and Replace tool is another useful way to identify and manipulate data
86
88
8. Verify your results look as expected, close preview tab and then click Process
While the MarcEditor provides a way to preview the results of your regular expression, you can also use a regex tester such as [Regex101](https://regex101.com/). A live regex tester allows you to copy in sample data and then build a regular expression to manipulate that test data. The tester is especially helpful because it provides an explanation of how the regular expression is working on your data, as well as built in quick references for common regex syntax and functions.
0 commit comments