I've many string that have two possible format to display page numbers: (pp. 4500-4503)
or just 4500-4503
(there may be also cases where I have only one page so (pp. 113)
or just 11
.
Some exemples of strings:
- Mitchell, J.A. (2017). Citation: Why is it so important. Mendeley Journal, 67(2), (pp. 81-95).
- Denhart, H. (2008). Deconstructing barriers: Perceptions of students labeled with learning disabilities in higher education. Journal of Learning Disabilities, 41, 483-497.
I'm using this regex for the first format:
r"pp\. \d+-\d+"
And this for the second one:
r"\d+-\d+"
Neither of them are working. I was also wondering: is there a way to use only one regex expression instead of creating two? Thank you