Revision: 28284
          http://sourceforge.net/p/bibdesk/svn/28284
Author:   hofman
Date:     2023-06-04 17:17:41 +0000 (Sun, 04 Jun 2023)
Log Message:
-----------
Don't remove leading 0 from tail of DOI

Modified Paths:
--------------
    trunk/bibdesk/BibItem.m

Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m     2023-06-04 16:01:41 UTC (rev 28283)
+++ trunk/bibdesk/BibItem.m     2023-06-04 17:17:41 UTC (rev 28284)
@@ -3873,12 +3873,13 @@
 static inline NSArray *extractAllDOIsFromString(NSString *string) {
     NSMutableArray *dois = [NSMutableArray array];
     // here is another exampled of a doi regex = 
10\.[0-9]+\/[a-z0-9\.\-\+\/\(\)]+;
-    AGRegex *doiRegex = [AGRegex 
regexWithPattern:@"doi[:\\s/]{1,2}(10\\.[0-9]{4,}(?:\\.[0-9]+)*)[\\s/0]{1,3}(\\S+)"
+    AGRegex *doiRegex = [AGRegex 
regexWithPattern:@"doi[:\\s/]{1,2}(10\\.[0-9]{4,}(?:\\.[0-9]+)*)[\\s/]{1,3}(\\S+)"
                                           
options:AGRegexMultiline|AGRegexCaseInsensitive];
     AGRegexMatch *match;
     for (match in [doiRegex findEnumeratorInString:string]) {
         if ([match groupAtIndex:1] != nil && [match groupAtIndex:2] != nil)
             [dois addObject:[NSString stringWithFormat:@"%@/%@", [match 
groupAtIndex:1], [match groupAtIndex:2]]];
+        NSLog(@"%@ %@",[match groupAtIndex:1],[match groupAtIndex:2]);
     }
     return dois;
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to