add text before the 2nd last space in each line?
I want to add a comma before the 2nd last time in each line of text in notepad ++, heres an example if what I mean : house, Road, westworld, Co. London H509 50565
so I want to add the comma after London, to make it appear like this: house, Road, westworld, Co. London, H509 50565
Terry R last edited by
heres an example if what I mean : house, Road, westworld, Co. London H509 50565
Are you able to confirm that the last piece “H509 50565” exists on all lines. Obviously not those exact characters, but that there are 2 words (a word here is defined as a string of non-blank characters) that need separating by adding the comma on every line. Without that assumption is might be difficult to decide where to place the comma.
@Terry-R thats right all the lines are two words, where I need to insert a comma before these last two words
Terry R last edited by Terry R
@Terry-R thanks that worked!