google-sheetsgoogle-sheets-formularegexp-replace

Add accents between values used for REGEXREPLACE (Google Sheets)


I have this formula:

=ARRAYFORMULA(UNIQUE(TRIM(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
REGEXREPLACE(REGEXEXTRACT(INDIRECT("T2:T"&COUNTA(T2:T)+1), REPT("(.)",
LEN(INDIRECT("T2:T"&COUNTA(T2:T)+1)))), "['A-Za-z\.-]", )),,999^99)),,999^99), " ")))))

Among the values to use are these:

"['A-Za-z\.-]"

When trying to add the accents ("['A-Za-z\.-’´`]"), it turns out not to work, it seems that the formula does not understand that these values can also be used, how do I include these accents within the formula?

´ `


Solution

  • the regex would need to list them all like:

    "['A-Za-z\.-áéíóúàèìòù]"