Javascript – Replace year in string from 1999 to current year (2024) using js regex
Can someone suggest me a better way of matching a year in a string between the provided ranges. A better (shorter) way than this: let str = 'Document created in 1999'; let str1 = 'Document created in 2000'; let str2…