I took your strings verbatim and ran my regular expression match. Code and results follow:
@strings = ("PMID: PMID: 4012367", "PMID: doi:10.1093/fampra/cmq003PMI +D: 20215333"); for $string (@strings) { if ($string =~ /PMID: (\d+)/) { print "$1\n"; } } #OUTPUT #4012367 #20215333
I'm not exactly sure what your problem is but my code does what I believe you want to accomplish.
In reply to Re^5: Extracting web data
by zek152
in thread Extracting web data
by smandape1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |