google sheet replace regex formula

Viewed 132

I want to remove any string that matches: _digitsxdigits like _8x7 and _999x1

=ArrayFormula(if((Input!A10:A=TRUE), SUBSTITUTE(Input!E10:E, REGEXEXTRACT(Input!E10:E,"[0-9]x[0-9]"),""), ""))

I get this error, but I'm not sure how to fix it.

enter image description here

2 Answers

Try

=ArrayFormula(if((A10:A=TRUE), REGEXREPLACE(E10:E,"([0-9])+x([0-9])+",""), ""))

try:

=INDEX(IF(A10:A=TRUE, REGEXREPLACE(E10:E, "(_\d+x\d+)", ), ))
Related