Hello!
I have two CSV files:
in the first file, there is a list of machines hostnames (ex: ABCZER12).
and in the second file, I have a list of the first letters of the machines hostnames (ex: ABC), and each expression correspond to a location (ex: Europe, Brazil...).
An example of the first file:
ABCZER12
ABCSDF56
ABCFHG76
OPQYGT65
XYTGHY41
XYZRFV78
And an example of the second file:
ABC => Europe
OPQR => Brazil
XY => USA
I need to associate each hostname with its corresponding location. To do that, I need to search for each hostname if its begining match with one of the expressions in the second list. Example: ABCZER12, ABCSDF56 and ABCFHG76 will match with ABC, means that those hostnames correspond to the location Europe.
Some hostnames can not match any of the expressions in the second list (ex: OPQYGT65).
In the second file, expressions does not always have the same amount of letters.
In the two files, there is no field that are the same, so I think that I can't use lookups to resolve my problem here.
If anyone have an idea to resolve my problem, it would be great.
Thanks 🙂
... View more