<?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=304185&amp;view=findpost&amp;p=2609297</guid>
        <pubDate>Mon, 31 May 2010 18:23:46 +0000</pubDate>
        <title>Замена регулярок</title>
        <link>https://forum.sources.ru/index.php?showtopic=304185&amp;view=findpost&amp;p=2609297</link>
        <description><![CDATA[gruy: Кстати, сама регулярка работает (проверял на питоне).]]></description>
        <author>gruy</author>
        <category>Python</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=304185&amp;view=findpost&amp;p=2609011</guid>
        <pubDate>Mon, 31 May 2010 11:09:34 +0000</pubDate>
        <title>Замена регулярок</title>
        <link>https://forum.sources.ru/index.php?showtopic=304185&amp;view=findpost&amp;p=2609011</link>
        <description><![CDATA[deil: <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">&nbsp;&nbsp; &nbsp; text.gsub!(talker1, &quot;[font color=blue][b][/b][/font]&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp; text.gsub!(talker2, &quot;[font color=red][b][/b][/font]&quot;)</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
В регекспы не вчитывался пока, но попробуй для начала заменить двойные кавычки на одинарные -- в двойных &#092; -- это управляющий символ, а в одинарных он игнорируется.]]></description>
        <author>deil</author>
        <category>Python</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=304185&amp;view=findpost&amp;p=2601786</guid>
        <pubDate>Sun, 23 May 2010 09:53:41 +0000</pubDate>
        <title>Замена регулярок</title>
        <link>https://forum.sources.ru/index.php?showtopic=304185&amp;view=findpost&amp;p=2601786</link>
        <description><![CDATA[Lookin for..: Входные данные и результаты таковы:<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>До</span><div class='quote '>Mr. A (23:37:12 20/05/2010)<br>
Привет<br>
<br>
Mr. A (23:37:14 20/05/2010)<br>
Как дела?<br>
<br>
<br>
Ms. B (23:37:22 20/05/2010)<br>
Нормально</div></div><br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>После</span><div class='quote '>[font color=blue]<strong class='tag-b'> </strong>[/font]<br>
Привет<br>
<br>
[font color=blue]<strong class='tag-b'> </strong>[/font]<br>
Как дела?<br>
<br>
[font color=red]<strong class='tag-b'> </strong>[/font]<br>
Нормально</div></div><br>
<br>
Тег [ b] проходит, просто не отображается на форуме]]></description>
        <author>Lookin for..</author>
        <category>Python</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=304185&amp;view=findpost&amp;p=2601738</guid>
        <pubDate>Sun, 23 May 2010 08:47:14 +0000</pubDate>
        <title>Замена регулярок</title>
        <link>https://forum.sources.ru/index.php?showtopic=304185&amp;view=findpost&amp;p=2601738</link>
        <description><![CDATA[gruy: Покажи несколько строк логов, и что в результате получается.]]></description>
        <author>gruy</author>
        <category>Python</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=304185&amp;view=findpost&amp;p=2601415</guid>
        <pubDate>Sat, 22 May 2010 18:38:53 +0000</pubDate>
        <title>Замена регулярок</title>
        <link>https://forum.sources.ru/index.php?showtopic=304185&amp;view=findpost&amp;p=2601415</link>
        <description><![CDATA[Lookin for..: Приветствую :)<br>
<br>
Я пишу скрипт, который будет размечать логи из квипа bb-тегами. Почему-то замена подстрок происходит не совсем корректно.<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">source = &quot;source.txt&quot;</div><div class="code_line">dest = &quot;dest.txt&quot;</div><div class="code_line">&nbsp;</div><div class="code_line">talker1 = /(Mr. A \((\d*:?)* (\d*\/?)*\))/</div><div class="code_line">talker2 = /(Ms. B \((\d*:?)* (\d*\/?)*\))/</div><div class="code_line">&nbsp;</div><div class="code_line">text = &quot;&quot;;</div><div class="code_line">File.open(source).each { |line|</div><div class="code_line">&nbsp;&nbsp; &nbsp;text &#60;&#60; line</div><div class="code_line">&nbsp;&nbsp; &nbsp;puts line</div><div class="code_line">&nbsp;&nbsp; &nbsp;text.gsub!(talker1, &quot;[font color=blue][b][/b][/font]&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;text.gsub!(talker2, &quot;[font color=red][b][/b][/font]&quot;)</div><div class="code_line">&nbsp;&nbsp; &nbsp;text.gsub!(&quot;\n\n\n&quot;, &quot;\n\n&quot;)</div><div class="code_line">}</div><div class="code_line">&nbsp;</div><div class="code_line">File.open(dest, &quot;w&quot;) { |f|</div><div class="code_line">&nbsp;&nbsp; &nbsp;f.puts text</div><div class="code_line">}</div></ol></div></div></div></div><br>
Не могли бы вы подсказать, где я налошил?]]></description>
        <author>Lookin for..</author>
        <category>Python</category>
      </item>
	
      </channel>
      </rss>
	