Let's say I have this text :

```
antianti
barbary
barberbarber

```

How can I match other occurences of the first 2 letters in each of those 'words', for example `an\an` in the first word and `ba\ba` in the second one ? I was trying to get it with :

```
/(^\w{2})/gm

```

Plus `\n` or `{2}` but to no eval. Any tips what am I doing wrong here ?