<?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>Hi-farm blog &#187; 正規表現</title>
	<atom:link href="http://blog.hi-farm.net/tag/%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hi-farm.net</link>
	<description>ActionScript 3.0 , AIR , FLEXからCocoa, OpenGL</description>
	<lastBuildDate>Sun, 05 Sep 2010 20:05:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>正規表現のメモ</title>
		<link>http://blog.hi-farm.net/2008/06/09/%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%ae%e3%83%a1%e3%83%a2/</link>
		<comments>http://blog.hi-farm.net/2008/06/09/%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%ae%e3%83%a1%e3%83%a2/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 04:38:26 +0000</pubDate>
		<dc:creator>hi-farm.net</dc:creator>
				<category><![CDATA[未分類]]></category>
		<category><![CDATA[正規表現]]></category>

		<guid isPermaLink="false">http://www.hi-farm.net/wp/?p=41</guid>
		<description><![CDATA[Actionscript3にも正規表現が公式に使えるようになりました。
プログラムやるには必須項目ともいうべき正規表現、僕は基礎からしっかり勉強してなかったので、この際勉強し直してみましたので、忘れないためにメモります。 [...]]]></description>
			<content:encoded><![CDATA[<p>Actionscript3にも正規表現が公式に使えるようになりました。</p>
<p>プログラムやるには必須項目ともいうべき正規表現、僕は基礎からしっかり勉強してなかったので、この際勉強し直してみましたので、忘れないためにメモります。</p>
<p>[]：文字クラス。[ ]内部のどれか1文字にマッチする<br />
例： [12] &#8211; 1あるいは、2にマッチ</p>
<p>-：範囲指定<br />
例：[1-6] &#8211; 1,2,3,4,5,6にマッチ<br />
[-1]などの場合は、リテラル（文字列）として扱う。</p>
<p>^：否定<br />
例：[^0-9]数字以外の物があればマッチ<br />
※何もない場合は、マッチしない。あくまで数字以外のものが存在する場合</p>
<p>[012][345][678]の場合<br />
[012]の中から1文字マッチ、[345]から1文字マッチ、[678]から1文字マッチする場合条件に一致した物とみなす。</p>
<p>¥d = [0-9]<br />
¥s = [ ¥t¥r¥n¥f]（空白文字、タブ、改行、復帰、改ページ）<br />
¥w = [a-zA-Z0-9]<br />
それぞれの大文字版（¥D, ¥S, ¥Wは小文字の否定版）</p>
<p>.：任意の1文字（原則、末尾の改行にはマッチしない）</p>
<p>|：選択（orに近い？）<br />
例：(red|white|green) &#8211; &#8220;red&#8221; or &#8220;white&#8221; or &#8220;green&#8221;でマッチする</p>
<p>?：直前の要素が0個or1個マッチ<br />
例：a(nd)? -&gt; a, andがマッチ（直前のtenが0,or 1回）</p>
<p>*：直前の要素が0個以上マッチ<br />
go*d -&gt; gd, god, goooooodなどがマッチ<br />
.* -&gt; 全てマッチ（任意の1文字が0回以上マッチ）</p>
<p>+：直前の要素が1個以上マッチ<br />
go+d -&gt; god , good, gooooodなどがマッチ</p>
<p>{n}：直前の要素がn回繰り返し<br />
例：a{5} aが5回繰り返し</p>
<p>{n,}：直前の要素がn回以上繰り返し</p>
<p>{n,m}：直前の要素がn回以上、m回以下繰り返し</p>
<p>^：文字列の先頭を表す場合あり<br />
^cat：cat, category = ○、 tomcat = ×</p>
<p>$：文字列の末尾</p>
<p>¥b：単語の境界（空白、タブ、/など）反意語は¥B</p>
<p>という感じです。</p>
<p>2007年9月29日02:37</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hi-farm.net/2008/06/09/%e6%ad%a3%e8%a6%8f%e8%a1%a8%e7%8f%be%e3%81%ae%e3%83%a1%e3%83%a2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
