I have batches of records to which I am applying standardizing formatting. Each batch has several header records which should not be touched, followed by hundreds of user records.
One such formatting is to add a full-stop after any initial or abbreviation which does not have one, such as "Smith, Dan F O'M," or "St Sebastian".
My (Perl based) Regex in Textpad starts like this-
(\<[[:upper:]]\>(?:'[[:upper:]])?)([", ])
which says find a "word" of 1 character, optionally followed by apostrophe and 1 character, then terminated with any of quote, comma or space. (ignoring other abbrev for the sake of clarity). The replace inserts the full-stop-
$1.$2
My problem is to exclude the header rows. The header rows do not begin with alpha, and the user rows do. My thought is to add at the front-
^[[:alpha:]].*?
This works by selecting from the start of the record, but I then need to run the "replace all" multiple times for as many abbreviations as could reasonably occur in a record (three seems OK).
Is there any Regex construct to "home in" to the user records and only select/replace each small element, so the cursor does not move past the start of the next initial in the same record?