Skip to main content
Best answer

Replacing text that has a variable string

  • November 26, 2021
  • 1 reply
  • 772 views

AppGuyAaron
Forum|alt.badge.img+1

I have a numbered list in text, with the format

1# blah blah blah

2# yo yo yo

3# do wa diddy

and I need to get rid of the 1# 2# 3# etc. This list could be really long. 

Can anyone thing of an efficient way that doesnt loop a million tasks to replace everything with some sort of wildcard? Iike find all (*#) and replace with a blank?

Thanks!

Best answer by Troy Tessalone

Hi @AppGuyAaron 

Try a Code step to do the regex replacing.

Use the replace() method: https://www.w3schools.com/jsref/jsref_replace.asp

 

 

RESULTS

 

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • Answer
  • November 26, 2021

Hi @AppGuyAaron 

Try a Code step to do the regex replacing.

Use the replace() method: https://www.w3schools.com/jsref/jsref_replace.asp

 

 

RESULTS