Guest User

Untitled

a guest
Sep 18th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. Regular expression for parsing authors information from a scientic article
  2. Aa Aaa 1, Bb Bbb 2 and Cc Ccc 1
  3. 1 Institut xx Xx, Some University, Xxxx 14, US-10000 NewYork, USA; E-Mails: aa.aaa@edu.com; cc.ccc@edu.com
  4. 2 Institut zz Zzz, Some University2, Zzzz 20, US-10000 NewYork, USA; E-Mail: bb.bbb@edu.com
  5.  
  6. Aa Aaa - Institut xx Xx, Some University, Xxxx 14, US-10000 NewYork, USA - aa.aaa@edu.com
  7.  
  8. Bb Bbb - Institut zz Zzz, Some University2, Zzzz 20, US-10000 NewYork, USA - bb.bbb@edu.com
  9.  
  10. Cc Ccc - Institut xx Xx, Some University, Xxxx 14, US-10000 NewYork, USA - cc.ccc@edu.com
  11.  
  12. $_ = "nn" . $input;
  13. 1 while s/^(.*?n?)n{1,2}s*([^d]+)s+(d+)s*?(?:s*and|[,ns])(.*?)(?<=n)(3s+)([^n]*)(n.*$|$)/$1$2 - $6nn$4$5$6$7/gs;
  14. s/nn.*$//s;
  15. print $_;
Add Comment
Please, Sign In to add comment