I am looking at a list of strings that are space separated. I am trying to find parts of string that contain a lower case "n" letter that is not next to an uppercase letter, then remove the lowercase "n" and any adjacent letter/number. Example:
before = ["23n 5T R3",
"4T 3R 2+ 2-",
"-2 +3RF n3",
"Nn1 L9 3+ n",
"un2 L0 -9 e"]
I am trying to get an output as:
after = ["5T R3",
"4T 3R 2+ 2-",
"-2 +3RF",
"Nn1 O9 3+",
"L0 -9 e"]
I am not exactly sure how to go about starting this regex condition. Apologies if its a bit tough one.