Filtering vertex property by specific pattern

I have vertex property filled with names

>> vp_string = G.new_vertex_property("string") 

How can I get vertex property that tells which vertex has specific patterns of name.
What I want to do is something like bellow.

>> vp_bool = G.new_vertex_property("bool")
>> for v, name in vp_string:
>>   if any(p in name for p in patterns):
>>     vp_bool[v] = True

find_vertex(g, prop, match) is simillar method that im looking for,
But it only works with value

It seems you already have a solution for what you need.

If you are searching for a specific function that does this pattern search for you, it does not exist. You have to loop as you are doing.