-1

I have a some text copied from the internet. It contains lot of places, those I have to remove. Few lines and occurrences are these:

"
related to such contracts.[79]
References[edit]
smart contract platform.[65][66]
Quorum.[63] It's designed

separate version became Ethereum (ETH) with the theft reversed,[12] 
and the original chain continued as Ethereum Classic (ETC).[13]

"

I tried using help on the internet:

^[\[]* [\]]$

I have to delete all [*]. And I have to get below output.

"
related to such contracts.
References
smart contract platform.
Quorum.It's designed
separate version became Ethereum (ETH) with the theft reversed, 
and the original chain continued as Ethereum Classic (ETC).

"
halfer
  • 19,824
  • 17
  • 99
  • 186
Sun
  • 3,444
  • 7
  • 53
  • 83

1 Answers1

-1

Is it what you're trying to achieve ? Please confirm.

(?:\[\w+\]*)

Test here : https://regex101.com/r/nr0H99/2

vincent PHILIPPE
  • 975
  • 11
  • 26
  • 1
    Note that this won't match `"[1.5]"` or `"[foo-bar]"`. Also, the non-capturing group and the `+` are redundant. – 41686d6564 stands w. Palestine Aug 20 '20 at 12:52
  • You are right, the `+` is redundant ! _Note that this won't match "[1.5]" or "[foo-bar]"._ I was thinking there might be only numbers and characters. I think it is greedy to match anything between ``[ ]``, but since it can be a string, why not matching anything. I have update the answer. – vincent PHILIPPE Aug 20 '20 at 12:55