<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=427615&amp;view=findpost&amp;p=3866995</guid>
        <pubDate>Tue, 31 May 2022 13:53:27 +0000</pubDate>
        <title>Как получить значение между двумя символами в строке?</title>
        <link>https://forum.sources.ru/index.php?showtopic=427615&amp;view=findpost&amp;p=3866995</link>
        <description><![CDATA[iPhonesoft: <strong class='tag-b'>Majestio</strong> спасибо вам огромное за помощь&#33;]]></description>
        <author>iPhonesoft</author>
        <category>PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=427615&amp;view=findpost&amp;p=3866993</guid>
        <pubDate>Tue, 31 May 2022 13:48:38 +0000</pubDate>
        <title>Как получить значение между двумя символами в строке?</title>
        <link>https://forum.sources.ru/index.php?showtopic=427615&amp;view=findpost&amp;p=3866993</link>
        <description><![CDATA[Majestio: <div class='tag-quote'><a class='tag-quote-link' href='https://forum.sources.ru/index.php?showtopic=427615&view=findpost&p=3866966'><span class='tag-quote-prefix'>Цитата</span></a> <span class='tag-quote__quote-info'>iPhonesoft &#064; <time class="tag-quote__quoted-time" datetime="2022-05-31T09:16:10+00:00">31.05.22, 09:16</time></span><div class='quote '>Подскажите пожалуйста, как можно получить число (3 в данном примере), между последним символом &quot;-&quot;, и &quot;.jpg&quot;?</div></div><br>
Лови солюшен:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;?php</div><div class="code_line">$string = &#39;some-facts-about-the-creative-process-3.jpg&#39;;</div><div class="code_line">$digit3 = (preg_match(&#39;/^.+-(\d+)\.jpg$/&#39;, $string, $matches)) ? $matches[1] : &quot;bad format!&quot;;</div><div class="code_line">echo $digit3;</div><div class="code_line">?&#62;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
Будет выводить любое число, состоящее только из цифр (целое)<br>
<div class="tag-spoiler spoiler closed"><div class="spoiler_header" onclick="openCloseParent(this)">Скрытый текст</div><div class="body">Чей Крым? :lol: </div></div>]]></description>
        <author>Majestio</author>
        <category>PHP</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=427615&amp;view=findpost&amp;p=3866966</guid>
        <pubDate>Tue, 31 May 2022 09:16:10 +0000</pubDate>
        <title>Как получить значение между двумя символами в строке?</title>
        <link>https://forum.sources.ru/index.php?showtopic=427615&amp;view=findpost&amp;p=3866966</link>
        <description><![CDATA[iPhonesoft: Добрый день,<br>
<br>
есть строка вида:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">$string = &#39;some-facts-about-the-creative-process-3.jpg&#39;;</div></ol></div></div></div></div><br>
<br>
Подскажите пожалуйста, как можно получить число (3 в данном примере), между последним символом &quot;-&quot;, и &quot;.jpg&quot;?<br>
<br>
Спасибо за помощь&#33;]]></description>
        <author>iPhonesoft</author>
        <category>PHP</category>
      </item>
	
      </channel>
      </rss>
	