user3568044 user3568044 - 1 year ago 61
Python Question

Regular expression for matching letters followed by digits

I have to match the citations within a document. The citations can be of the forms:
Author names, year; Author names(year); (Author names,year)
For example: 'James et al., 2010', 'James & Juda, 2010', 'James & Juda(2010)','(James & Juda, 2010)'.
I have tried:




One or more occurrences of characters followed by some punctuations and then 4 digits( specifying year) is what I meant. But its not working. Please help me with this regard.

Answer Source

Below regular expression will match all the samples which you have given.


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download