Sample data 

```
vector1 <- data.frame(name1=c("amsterdam, i.o.","jiřom e.g.", "higgins dec e.o.")) 
vector2 <- data.frame(name2=c("hello no e.y.","jiřom e.g.","oxford road w.o.o"),num=c(2,3,4))

```

I tried this approach, but it fails on some expressions. What would be the bullet proof solution? Would regex solution solve it?

```
 vector1$vec1 <- vector2$num[match(vector1$name1,vector2$name2)]

```

The above works on this occasion and the bellow result is the desired outcome. 

```
              name1  vec1
 1  amsterdam, i.o.   NA
 2       jiřom e.g.    3
 3 higgins dec e.o.   NA

```