Index of integer in a string


#1

Hi all,
I have a list of strings (family names). I would like to remove all the integers (is a string) in the family names. Is there a way to remove ‘integer string’ from the names? My appologies if the lattent is vague. I dont know how to formulate this in any other way. Can sombody help me?

Tnx in advance,

Rasa


Filtering integers in a string
#2

please screenshot with you current result and what are you want to see


#3

First of all:
Do you have the clockwork package?
Having the List.From.String node from that one is going to make it a whole lot easier.


#4

IMHO regex should be used

import re
string = "blabla12bla bla 2 bla 312"
OUT = re.sub(" \d+", " ", string)

#5

what its mean?


#6

probably digit :smiley:


#7

but not inside the text ?:grinning:

image


#8

Strange :smiley:


#9

:hushed:


#10

oh it’s white space…
"\d+" istead of " \d+"


#11

yes!)))
beautifully,

I like this decision


#12

Thank u @Tomasz_Puchala. This is exactly what i wanted. Cheers