Get capital letters by condtion

arf, I thought you were looking for what is between 2 _ _
in this case you delete the del(list[-1))

cordially
christian.stan

1 Like

@christian.stan ,

thats true! actually my naming is already mess that it happens 2 times is just accidantly

KR

Andreas

1 Like

automation by managing the input balls :grinning:, it’s not great :wink: to manage

cordially
christian.stan

1 Like

@christian.stan ,

i try to find out “to do right things in the wrong enviroment” :wink: … …i already delivered my door schedule

KR

Andreas

1 Like

Yes, you can manage your lists through Python:

import re
pattern = r'(?<![A-Z])[A-Z]{3}(?![A-Z])'
OUT = []
for x in IN[0]:
    ucc = re.findall(pattern,x)
    if len(ucc)==1: OUT.extend(ucc)
    elif len(ucc)>1: OUT.append(ucc)
    else: OUT.append("XXX")

or do something like this:

import re
pattern = r'(?<![A-Z])[A-Z]{3}(?![A-Z])'
OUT = ["_".join(re.findall(pattern,x)) for x in IN[0]]```
5 Likes