1

I'm trying to extract alpha sequences in strings in Google spreadsheets.

My sequences are like 75% Cotton, 15% Organic wool, 10% Polyurethane. My desired output would be Cotton, Organic wool, Polyurethane

I tried =REGEXEXTRACT(A1; "([a-zA-Z ]+),") which gives me only the first occurrence Cotton. This seems to be a known limitation. Is there another chance to get the desired result?

player0
  • 124,011
  • 12
  • 67
  • 124
Zin Yosrim
  • 1,602
  • 1
  • 22
  • 40

2 Answers2

1

try:

=TRIM(REGEXREPLACE(A1, "[0-9%]", ))

0

player0
  • 124,011
  • 12
  • 67
  • 124
1

You can match 1+ digits preceded by a word boundary \b[0-9]+ followed by % and a space and replace that with an empty string.

=REGEXREPLACE(A1, "\b\d+% ", "")

enter image description here

The fourth bird
  • 154,723
  • 16
  • 55
  • 70