I am trying to capture a link in my python script.
I have a variable holding the regex pattern.

I want to capture below link from the page HTML.

```
<a class="pg-normal pg-bton" href="/department/office/pg2"> NEXT >> </a>

```

The code is:

```
parser = "lxml" 
next_regex = r'(.*?)NEXT(.*?)'
html_bodySoup = BeautifulSoup(urllib.request.urlopen(url), parser)
links = html_bodySoup.find_all('a', href = re.compile(nextpg_regex))

```

Can't find what is the problem, but it does not give me the link as desired. I tried other more accurate regex patterns as well.