B
B
BushaevDenis2017-09-27 11:21:17
PHP
BushaevDenis, 2017-09-27 11:21:17

How to remove possible characters?

Let's say there is a string [shortcode], it can be supplied both in the form " [shortcode]", and in " <p>[shortcode]</p>".
How to make one regular expression for preg_replace for both cases?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
display: block, 2017-09-27
@BushaevDenis

https://regex101.com/r/D8DfPZ/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question