Answer the question
In order to leave comments, you need to log in
How to get the given expression from a string?
Good afternoon! Need help. I can't figure out the regex..
There is a line:
poster|text||title|text||title_en|text||year|2020||description|any characters can be here||countries|text||genres|text|| .....
Need to get ||description|some text||
Answer the question
In order to leave comments, you need to log in
/(\|\|description\|[^|]+\|\|)/
php code :
<?php
$string = 'poster|text||title|text||title_en|text||year|2020||description|тут могут быть любые символы||countries|text||genres|text|| .....';
preg_match('/(\|\|description\|[^|]+\|\|)/', $string, $matches);
var_dump($matches[1]);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question