How to apply a regular expression?

Please tell me how to use regular expressions for strings:

re-medbedb-re-darksun-re-bit8k-khorosho-li-chto-kazhdyi-den-sozdayutsya-novye-kriptovalyuty-20161102t054454811z

cut all the strings that start with re-, and date from the end of the line, leaving only the middle? The number of substrings that re - an unknown number.

In this case, the output I want to obtain this:

khorosho-li-chto-kazhdyi-den-sozdayutsya-new-kriptovalyuty


Understand that you can confuse with recursive sub_str, but some garbage. Regular expression to get a nice, but.. there for me complete the dark forest yet -- he will not understand and for the week.
July 2nd 19 at 13:13
1 answer
July 2nd 19 at 13:15
Solution
Super service!!! )) Thanks a lot, bookmarked added much life easier) - Jonathon.Wintheiser commented on July 2nd 19 at 13:18
And thank you for the answer ;-) - Jonathon.Wintheiser commented on July 2nd 19 at 13:21
: Yes, in General Yes.. enjoy! )))) - Alison.Bail commented on July 2nd 19 at 13:24
: And this expression does not work: re-kriptograf-moi-testovyi-vvod-v-kraudseil-golos-1-btc-20161102t045831832z", because there is no separating the re-. How can that be?) - Jonathon.Wintheiser commented on July 2nd 19 at 13:27
: www.skillz.ru/dev/php/article-Regulyarnye_vyrazhen... read there.. I think will be the response + will podnataskalsya in regexps.. and if you need both.. need to watch... - Alison.Bail commented on July 2nd 19 at 13:30

Find more questions by tags PHP