1

So, in my document, I have many code blocks like the one below

```javascript
class App extendsReact.Component{
  state ={
isLoading:true,
    users:[],
    error:null
}

render(){
<React.Fragment>
</React.Fragment>
}
}
```

There are multiple such code blocks in my article (they are essentially Markdown javascript syntax).

I want to find replace (or remove) such code blocks in my article.

Thus, I want to simply delete such code blocks using Find/Replace.

  • I'm not completely sure I understand your question. It might be helpful to try and word it differently. What are you trying to accomplish exactly? – Ariane Jan 26 at 3:23
  • 1
    Oops...sorry....For some reason, the text I had typed went missing....I have updated it again now...Thanks for letting me know... – testndtv Jan 26 at 3:40
  • Great! Now your question is much clearer. I'm sure someone will be able to help you out now. – Ariane Jan 26 at 3:44
  • Sure....sounds good.... – testndtv Jan 26 at 3:54
  • 1
    Are the three backticks and the word javascript part of the block to remove? Could you edi tyour question and add expected result? I guess you want to remove blocks between pair of three backticks, am I right? – Toto Jan 26 at 10:57
2
  • Ctrl+H
  • Find what: ```javascript.+?```
  • Replace with: LEAVE EMPTY
  • CHECK Wrap around
  • CHECK Regular expression
  • CHECK . matches newline
  • Replace all

Screen capture (before):

enter image description here

Screen capture (after):

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.