Search code examples
google-sheetsnsregularexpression

Regualr expression for google Sheet Find and Replace


I have some rows in some columns contains something like

  • #Invalid Ref: 234566
  • #Invalid Ref: 123445
  • #Invalid Ref: 235678

I am trying to use find and replace by regular expression to find any row that contains any of the above and replace it with empty

what is the best regular expression I can use?


Solution

  • If the last numbers are always six digits, this should work. See google's explanation for Regex Find Replace for more examples.

    ^#Invalid Ref: [0-9]{6}$
    

    enter image description here