I'm using `wp_link_pages()` to display pagination, Which looks like:

```
1
<a href="/2">2</a>
<a href="/3">3</a>
<a href="/4">4</a>

```

Since this just returns a formatted html string like the above, I find it hard to wrap the current page number in a span to look something like:

```
<span class="current">1</span>
<a href="/2">2</a>
<a href="/3">3</a>
<a href="/4">4</a>

```

How to wrap a number surrounded with spaces (sometimes nothing or even `<a>` tags) in a span tag?