I am trying to write a script that parses filename of a comicbook and tries to extract info such as Seriesname, Publication year etc.In this case, I am trying to extract publication year from the name. Consider the following name, I would need to match and get value 2003. Below is the expression I had for this.

```rb
r = %r{ (?i)(^|[,\s-_])v(\d{4})($|[,\s-_]) }

```

However this matches the number irrespective of what character I have before the v or after the number

I expect the first two to not match and the third to match.

* 010 - All Star Batman & Robin The Boy Wonder 01 - av2003
* 010 - All Star Batman & Robin The Boy Wonder 01 - v2003t
* 010 - All Star Batman & Robin The Boy Wonder 01 - v2003

What am I doing wrong in this case?