T
T
TomasHuk2018-01-29 12:36:36
Regular Expressions
TomasHuk, 2018-01-29 12:36:36

How to remove regex text {a lot of text}?

Word has many pieces of the form

{Part of the first article 3 was supplemented by a paragraph with another paragraph from Law No. 1472-VIII dated 14.07.2016}

Characters inside {} - any.
I want to replace these pieces with "nothing", delete (together with "{" and "}").
How to form a regular expression?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
TomasHuk, 2018-01-29
@TomasHuk

Thanks everyone for the tips.
Unfortunately, Word has its own specific replacement for regular expressions.
The replacement worked (\{*\}), with the "Wildcards" checkbox enabled.

4
4iloveg, 2018-01-29
@4iloveg

Whatever problems with modifiers can be clarified to this: https://regex101.com/r/OqA5Z6/1

D
Dmitry Kim, 2018-01-29
@kimono

preg_replace('~({[^}]*})~', null, $string);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question