@ -65,7 +65,7 @@ export class I18nService {
}
private parseLanguageCode(aFileName: string) {
const match = aFileName.match(/\.([a-zA-Z]+)\.xlf$/);
const match = /\.([a-zA-Z]+)\.xlf$/.exec(aFileName);
return match ? match[1] : DEFAULT_LANGUAGE_CODE;
@ -375,7 +375,7 @@ export function parseDate(date: string): Date {
// Transform 'yyyyMMdd' format to supported format by parse function
if (date?.length === 8) {
const match = date.match(/^(\d{4})(\d{2})(\d{2})$/);
const match = /^(\d{4})(\d{2})(\d{2})$/.exec(date);
if (match) {
const [, year, month, day] = match;