Skip to Main Content
Mathematica 錦囊妙計
book

Mathematica 錦囊妙計

by Sal Mangano
April 2014
Beginner to intermediate content levelBeginner to intermediate
830 pages
15h 21m
Chinese
GoTop Information, Inc.
Content preview from Mathematica 錦囊妙計
186
|
第五章
"p1$"
匹配以
p1
模式結尾的字串
"^p1$"
恰好匹配
p1
模式的字串
"\\d"
任意
0
9
的數字
"\\s"
空白字元
延伸資訊
Jeffrey E.F. Friedl 所著 的《
Mastering Regular Expressions
》( 第二 版,O
Reilly 出版
是正規表示式最完整的參考書籍,如果你想用正規表示式進行任何複雜動作,這本書可
為你節省數小時的嘗試時間並免去挫折感。
Mathematica 提供絕佳的字串模式教學文件:
tutorial/WorkingWithStringPatterns
,網頁
版的網址為
http://bit.ly/yGbND
,內容除了全方位介紹字串模式之外,還特別為 Perl
式設計師提供一節,作為從 Perl Mathematica 字串處理的經驗傳承。
5.1 字串比較
問題點
你想對字串進行比較,但
Less
LessEqual
Greater
GreaterEqual
指令無法應用於
字串上。[Page-187]
解決方案
Order[e1,e2]
指令進行字串比較,輸出 1 表示
e1
排在
e2
前面;輸出 -1 表示
e1
排在
e2
後面;輸出 0 表示兩字串相等。
ch05.indd 186 2014/4/2 上午 06:13:02
5.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ubuntu for Non-Geeks, 4th Edition

Ubuntu for Non-Geeks, 4th Edition

Rickford Grant, Phil Bull

Publisher Resources

ISBN: 9789863470106