User:Ohconfucius/test/MOSNUM dates code.js: Difference between revisions

Content deleted Content added
changed from catch-all ".*?" to "[^<]*?" following nondetection at USS Enterprise (1799)
add space between full date ranges
Line 249:
//reformat dmy-dmy and mdy-mdy (birth-death ranges)
ohc_regex(/(\D\W)@DD\s@Month,? @Year(?:(&nbsp;|\s)?(?:[-–—]|&ndash;)(?:&nbsp;|\s)?)@DD\s@Month,? @Year(?=\D\W)/gi, "$1@Day1 @LMonth1 @Year1$2– @Day2 @LMonth2 @Year2");
ohc_regex(/(\D\W)@Month\s@DD,? @Year(?:(&nbsp;|\s)?(?:[-–—]|&ndash;)(?:&nbsp;|\s)?)@Month\s@DD,? @Year(?=\D\W)/gi, "$1@LMonth1 @Day1, @Year1$2– @LMonth2 @Day2, @Year2");
ohc_regex(/(\D\W)@DD\s@Month,? @Year(?:(?:[-–—]|&ndash;)(?:&nbsp;|\s)?)@DD\s@Month,? @Year(?=\D\W)/gi, "$1@Day1 @LMonth1 @Year1$2 – @Day2 @LMonth2 @Year2");
ohc_regex(/(\D\W)@Month\s@DD,? @Year(?:(?:[-–—]|&ndash;)(?:&nbsp;|\s)?)@Month\s@DD,? @Year(?=\D\W)/gi, "$1@LMonth1 @Day1, @Year1$2 – @LMonth2 @Day2, @Year2");
 
//nbsp in publication archive & access dates