Hello! I ask for your help.
There is a text:
By origin natural honey can be floral and [[Fallen honey | padevy]]. Flower and [[honeydew honey]] Flower honey is produced by bees in the process of collecting and processing [[Nectar (sugary juice) | nectar]], secreted by [[nectar]] am plants both flowering and extra-flowering. [[Honeydew honey]] the bees produce by collecting [[Drops (beekeeping) | Drops]] (sweet discharge [[aphids]] and some other insects) and honey dew from the leaves or stems of the plants. Honeydew honey is toxic for bees, therefore it is not left in beehives for the period of wintering of bees. Types of flower honey
I want to choose everything in it in square brackets, for example: [[honeydew honey]] and [[nectary]]
As a separate regular, I want to select entries like these: [[aphids | aphids]] and [[Pad (beekeeping) | pad]] (i.e. with a vertical bar), but so that I can redo it in the preg_replace, taking separate line to the dash and after the dash.
I tried in the first case to do so: \[\[[а-я]+\]\] But this does not work in the entries with spaces. Trying to add a space: \[\[[а-я, ]+\]\] or so \[\[[а-я]+\s\]\] - does not work at all. I think if I understand the principle of the first regular season, the second will not be difficult. However, I would be grateful for the help.