fork download
  1. <?php
  2.  
  3. $text = '_это_та_самая_строка.окончание';
  4. preg_match_all('/_([^_.]+)\./u', $text, $matches);
  5. print_r( $matches[1] );
  6. preg_match_all('/_\K[^_.]+(?=\.)/u', $text, $matches);
  7. print_r( $matches[0] );
Success #stdin #stdout 0s 82944KB
stdin
Standard input is empty
stdout
Array
(
    [0] => строка
)
Array
(
    [0] => строка
)