Multiple search/replace from start of each line
Posted: Tue Oct 20, 2020 4:47 am
I need to add full stops to initials in a series of records, but only for the records where the first character is an alpha. Other records not beginning with a name may also contain initials but these must not be touched.
so like example:
Smith, Robin John G H C, bla, bla...
Thompson, Ian P, bla, bla..
I can limit initial matches with the following regex:
and then replace with and added full-stop as follows:
This finds the "G" above, but then due to the cursor positioning after match, it does not find the H and C in that same record.
Is there some way to achieve this, without repeating the replace all on the file multiple times?
I am using Textpad 8.2
thanks, Lyle
so like example:
Smith, Robin John G H C, bla, bla...
Thompson, Ian P, bla, bla..
I can limit initial matches with the following regex:
Code: Select all
^([[:alpha:]].*?\<[[:alpha:]]\>)([, ])Code: Select all
$1.$2Is there some way to achieve this, without repeating the replace all on the file multiple times?
I am using Textpad 8.2
thanks, Lyle