<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>寂静的深海 &#187; 正则</title>
	<atom:link href="http://www.deepseath.com/?feed=rss2&#038;tag=%E6%AD%A3%E5%88%99" rel="self" type="application/rss+xml" />
	<link>http://www.deepseath.com</link>
	<description></description>
	<lastBuildDate>Mon, 29 Jan 2024 09:55:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>CKEditor或者FCKEditor编辑器的分页处理</title>
		<link>http://www.deepseath.com/?p=733</link>
		<comments>http://www.deepseath.com/?p=733#comments</comments>
		<pubDate>Tue, 27 Jul 2010 07:40:34 +0000</pubDate>
		<dc:creator>Deepseath</dc:creator>
				<category><![CDATA[实验室]]></category>
		<category><![CDATA[CKEditor]]></category>
		<category><![CDATA[FCKEditor]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[开发]]></category>
		<category><![CDATA[正则]]></category>

		<guid isPermaLink="false">http://www.deepseath.com/?p=733</guid>
		<description><![CDATA[CKEditor就是FCKEditor的改名版本，呵呵。基于javascript的前端HTML编辑器，一般做内容管理系统的基本都用过这个编辑器，很强大很方便。 做内容管理某个内容可能文字会很多，分开发表的话不方便维护管理，一般就是直接使用CKEditor的分页功能，说白了这个无非就是类似下面的一段HTML代码：   如果要想在前台输出的时候分页是做不到的。我一般会有两种方式进行处理： 1.利用服务端在输出到页面前进行分页。 2.利用前端javascript直接进行分页。 习惯上我比较喜欢第一种，呵呵。第二种在目前的项目中准备要用到。 先说第一种方式，其实就是利用PHP将CKEditor的分页代码替换为某个标识符，然后进行下一步处理。 比如，利用正则将分页代码替换为“&#60;!&#8211;/*page-breaker*/&#8211;&#62;” &#60;?php $content = preg_replace('/&#60;div\s*style\s*=\s*"page-break-after\s*:\s*always\s*;\s*"[^&#60;\/div&#62;]*&#62;\s*&#60;span\s*style\s*=\s*"\s*display\s*:\s*none\s*;\s*"\s*[^&#60;\/span&#62;]*&#62;(.+)&#60;\/span&#62;\s*&#60;\/div&#62;/iUs',"&#60;!--/*page-breaker*/--&#62;",$content); ?&#62; 这样就将HTML的分页代码替换为一个常规的字符串。然后利用explode函数重组为数组进行分页处理。当然，如果喜欢可以每次都使用正则直接输出一个数组^_^ 第二种方式，是参考别人利用jQuery写的：http://www.blogjava.net/haha1903/archive/2010/06/23/324223.html，暂时没使用过，记下来备用吧，呵呵。 $(function() { var top = "#content"; var content = $(top); var all = content.find("*"); var pages = []; function hideContent() { all.hide(); } function showArray(arr) { $.each(arr, function(i) { this.show().parentsUntil(top).show(); }); } function initPages(pageBreaks) { pageBreaks.each(function(index) { $(this).attr("id", "pageBreak" [...]]]></description>
		<wfw:commentRss>http://www.deepseath.com/?feed=rss2&#038;p=733</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP的正规表达式中内置的通用字符簇</title>
		<link>http://www.deepseath.com/?p=382</link>
		<comments>http://www.deepseath.com/?p=382#comments</comments>
		<pubDate>Thu, 30 Oct 2008 06:08:59 +0000</pubDate>
		<dc:creator>Deepseath</dc:creator>
				<category><![CDATA[程序人生]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[正则]]></category>

		<guid isPermaLink="false">http://www.deepseath.com/?p=382</guid>
		<description><![CDATA[总忘记这些东西，每次需要用到的时候都是现找，懒的时候就用其他方法绕过去。 字符簇 含义 “[[:alpha:]]” 任何字母 “[[:digit:]]” 任何数字 “[[:alnum:]]” 任何字母和数字 “[[:space:]]” 任何白字符 “[[:upper:]]” 任何大写字母 “[[:lower:]]” 任何小写字母 “[[:punct:]]” 任何标点符号 “[[:xdigit:]]” 任何16进制的数字，相当于[0-9a-fA-F]]]></description>
		<wfw:commentRss>http://www.deepseath.com/?feed=rss2&#038;p=382</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
