Ȼ/15

Top / Ȼ / 15

ɽ ½

ؤ褦ɽʤΤǤ뤬ˤٴƤʤȤȤȤ˻ȤʤѤǤ⤢롥 Ǻϡ٤ͤɽ˴졢줫褦ˤ褦


notes.png ޤϰλ JNorth_arrow-right-sm.png ɽ ܤ̤ɽ 򸫤Ƥ ޤ⤷⤽˽񤤤Ƥ (2) emacs ǡġ ºݤ˻ƤʤΤǤСƤ

Emacs ǤɽѤˤƤ (visual-regexp)

Emacs ǤϡɽѤ¾ĶХåå \ ¿Ѥ뷹äȤ狼ˤ visual-regexp.el Ȥ elisp Emacs Ƴ(ĥǽΤ褦ʤ)ɽγʬܤdzΤʤɽϤƤȤǤΤǡޤϤ򥤥󥹥ȡ뤷Ƥ

ưǥ󥹥ȡ

Ƽưǥ󥹥ȡ뤹ϼΤ褦˺Ȥ뤳Ȥˤʤ

  1. JNorth_arrow-right-sm.png ȯ visual-regexp.el ɤʬΥեΤɤ֤*1
  2. JNorth_arrow-right-sm.png ȯ Installation ˤ褦 emacs ե(̾ ~/.emacs.d/init.el
     (add-to-list 'load-path "folder-in-which-visual-regexp-files-are-in/") ;; if the files are not already in the load path
     (require 'visual-regexp)
     (define-key global-map (kbd "C-c r") 'vr/replace)
     (define-key global-map (kbd "C-c q") 'vr/query-replace)
    Ƚ񤭹ࡥ

package Ȥäƥ󥹥ȡ

ver.24ʹߤ Emacs Ǥ package ()ɸʤΤǡpackage ꤬ѤǤʤмΤ褦˺Ȥɤ

  1. Emacs M-x␣package-refresh-contents Ȥ(ǰΤ)
  2. Emacs M-x␣package-install␣visual-regexp Ȥ롥
  3. emacs ե(̾ ~/.emacs.d/init.el
     (define-key global-map (kbd "C-c r") 'vr/replace)
     (define-key global-map (kbd "C-c q") 'vr/query-replace)
    Ƚ񤭹*2

Emacs package Ȥϡ

ver.24 ʹߤ Emacs ɸǤĤƤ elisp *3ΥݥȥϿƤ͡ elisp 줷ưʻȤߤǤ롥 ϡemacs ե(̾ ~/.emacs.d/init.el

 ;;
 (setq url-proxy-services '(("http" . "toyonakans.ecs.cmc.osaka-u.ac.jp:3128"))) 󶵰饷ƥξΤߤιԤɬ
 ;;
 (require 'package)
 (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
 (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
 (package-initialize)

4(󶵰饷ƥξϤ⤦1)񤭹ǤФ褤

Emacs ɽָʤ׻Ƥߤ褦


notes.png Τ褦ˤơvisual-regexp Ƥߤ褦

ޤʸǡ*4 Emacs ɤ߹Ǥߤ褦

Gender,GivenName,Surname,StreetAddress,City,State,ZipCode,EmailAddress,TelephoneNumber,Birthday,Occupation,Kilograms
female,Nina,Narita,"1870 Pine Tree Lane",Odenton,MD,21113,NinaNarita@fleckens.hu,240-373-9832,9/17/1942,Erector,50.1
male,Michinori,Sugiyama,"1651 Beechwood Avenue",Plainfield,NJ,07060,MichinoriSugiyama@gustr.com,908-791-7658,9/26/1932,"Railroad conductor",102.1
male,Tatsuki,Nozaki,"1224 Pick Street",Walden,CO,80480,TatsukiNozaki@fleckens.hu,970-723-5529,12/23/1962,"Rental clerk",113.2
male,Kunihiro,Tagami,"2156 Terry Lane",Orlando,FL,32801,KunihiroTagami@rhyta.com,321-273-4846,1/3/1943,"Show host",77.6
female,Hozumi,Iwasaki,"1380 Nuzum Court",Hamburg,NY,14075,HozumiIwasaki@cuvox.de,716-646-1784,1/28/1989,"Affirmative action coordinator",92.9
male,Yoshimitsu,Akita,"2602 Masonic Hill Road","Little Rock",AR,72212,YoshimitsuAkita@einrot.com,501-516-6338,8/23/1986,"Multiple machine tool setter",94.9
female,Chise,Sakuma,"2415 Wildwood Street",Boardman,OH,44512,ChiseSakuma@fleckens.hu,330-716-0474,6/10/1939,"School social worker",73.2
female,Shirabe,Terada,"1372 Pearl Street","West Sacramento",CA,95691,ShirabeTerada@superrito.com,916-376-5441,8/6/1942,"Public address system announcer",57.8
female,Yuiri,Fukuhara,"4220 Reeves Street",Milwaukee,WI,53202,YuiriFukuhara@einrot.com,920-827-6614,6/16/1947,"Nutrition director",59.6

ޤϸƤߤ

  1. ˡEmacs Ǥʸ˥֤Ƥ, C-c␣r Ȥ^ ϤƤߤ褦 Ƭꤵ줿Τʬ 狼ä顢C-g visual-regexp ߤ褦

  2. ˡEmacs C-c␣r ȤƤ顢$ ϤƤߤ褦 ꤵ줿Τʬ (ʲƱ)

  3. ˡEmacs C-c␣r ȤƤ顢e\{2\} ϤƤߤ褦 e 2󷫤֤줿ʬꤵ줿Τʬ (ʲƱ)

  4. ˡEmacs C-c␣r ȤƤ顢a\|b ϤƤߤ褦 a b Ȥʸꤵ줿Τʬ (ʲƱ)

  5. ˡEmacs C-c␣r ȤƤ顢\b, ϤƤߤ褦*5 ñ˰³ޡ ꤵ, ¾ΥޤϻꤵƤʤΤʬ (ʲƱ)

  6. ˡEmacs C-c␣r ȤƤ顢\bco\b ϤƤߤ褦. Ω co ꤵ, court com ˴ޤޤ¾ co ϻꤵƤʤΤʬ (ʲƱ)

  7. ˡEmacs C-c␣r ȤƤ顢^[^/]*/ ϤƤߤ褦 ֺǽ˽ФƤ / ޤǡפꤵ줿Τʬ (ʲƱ)

  8. ˡEmacs C-c␣r ȤƤ顢[0-9]+/[0-9]+/[0-9]+ ϤƤߤ褦 ֿİʾ/İʾ/İʾפꤵ, ǯʬꤵ줿Τʬ (ʲƱ)

  9. ˡEmacs C-c␣r ȤƤ顢\(female.*\)\([0-9]+/[0-9]+/[0-9]+\) ϤƤߤ褦 Emacs ɽΥ롼ԥ \( \) ΰ̣Ǥ狼 (ʲƱ)



֤Ƥߤ褦

  1. ˡEmacs C-c␣r ȤƤ顢^ ϤƤߤ褦 ƬꤵΤǡ Enter 򲡤Ƥ顢begin ȤǤϤƤߤ褦 ˤΥߥ󥰤 C-c␣p 򲿲󤫲Ƥߤ褦 ɤˤɤѲΤͽ¬Ǥ ơ Enter 򲡤ơѲƤߤ褦 ǼǼ顢M-x␣undo Ȥơѹ򸵤᤽

  2. ˡEmacs C-c␣r ȤƤ顢$ ϤƤߤ褦 ꤵΤǡ Enter 򲡤Ƥ顢C-q C-j ϤƤߤ褦 ʤߤˡC-j ϲԥ LF Τȡ ơC-q Ϥ楳ɤ(ǽ)֤ΤޤޡϤ뤿˻Ȥǽ quoted-insert ΥХǥ󥰤Ǥ롥 (ʲƱ)

  3. ˡEmacs C-c␣r ȤƤ顢e\{2\} ϤƤߤ褦 e 2󷫤֤줿ʬꤵΤǡ Enter 򲡤Ƥ顢EE ϤƤߤ褦 (ʲƱ)

  4. ˡEmacs C-c␣r ȤƤ顢a\|b ϤƤߤ褦 a b ȤʸꤵΤǤ Enter 򲡤Ƥ顢ZZZ ϤƤߤ褦 (ʲƱ)

  5. ˡEmacs C-c␣r ȤƤ顢\b, ϤƤߤ褦 ñ˰³ޡ ꤵΤ, Enter 򲡤Ƥ顢___ ʤɤϤƤߤ褦 (ʲƱ)

  6. ˡEmacs C-c␣r ȤƤ顢\bco\b ϤƤߤ褦. Ω co ꤵΤ, Enter 򲡤Ƥ顢Colorado ʤɤϤƤߤ褦 (ʲƱ)

  7. ˡEmacs C-c␣r ȤƤ顢^[^/]*/ ϤƤߤ褦 ֺǽ˽ФƤ / ޤǡפꤵΤ, Enter 򲡤Ƥ顢before birthday/ ʤɤϤƤߤ褦 (ʲƱ)

  8. ˡEmacs C-c␣r ȤƤ顢[0-9]+/[0-9]+/[0-9]+ ϤƤߤ褦 ֿİʾ/İʾ/İʾפꤵ, ǯʬꤵΤǤ Enter 򲡤Ƥ顢--removed-- ʤɤϤƤߤ褦 (ʲƱ)

  9. ˡEmacs C-c␣r ȤƤ顢\(female.*\)\([0-9]+/[0-9]+/[0-9]+\) ϤƤߤ褦 Emacs ɽΥ롼ԥ \( \) ΰ̣Ǥ狼Τǡ Enter 򲡤Ƥ顢\1--removed-- ϤƤߤ褦 female ǯǡΤߤ񤭴Ȥ뤳Ȥʬ (ʲƱ)



ʬǹͤƤߤ褦

ʲͤƤߤ褦 ǤСǡϺ10ʬǤϤʤ fileFakeNameGenerator.com_ab6e7cf9.zip *6˴ޤޤƤǡ 1000ʬǤäƤߤ褦

  1. ΥǡܤǸˤϤäɤߤˤΤǡƤΥޤθ˥ڡ줿 ɤ褤äƤߤ褦 ޤä鸵᤽

  2. ΥǡܤǸˤϤäɤߤˤΤǡƤιܤܰԤˤ ĿͤΥǡΤޤȤޤꤴȤ˶Ԥ򶴤Ƕ̤Ǥ褦ˤ⤷ Ĥޤꡢ
    female
    Nina
    Narita
    "1870 Pine Tree Lane"
    Odenton
    MD
    21113
    NinaNarita@fleckens.hu
    240-373-9832
    9/17/1942
    Erector
    50.1
    
    male
    Michinori
    Sugiyama
    "1651 Beechwood Avenue"
    Plainfield
    NJ
    07060
    MichinoriSugiyama@gustr.com
    908-791-7658
    (ʲά)
    Τ褦ˤ ɤФ*7 (ʲƱ)

  3. Υǡǯ //ǯ Ȥ¤ӤܤǯեޥåȤȤʤޤʤΤǡǯ--Ȥɽ, 㤨 1942-9-17 ľ ɤФ (ʲƱ)

  4. ΥǡιˤϥڡäƤʤϤǰΰ٤ˤǧ ơ⤷ڡͭС ɤФ (ʲƱ)

  5. ΥǡƱοͤ뤫ʤ٤ñĴ٤(뤫ɤ狼ɤ) ɤФ (ʲƱ)

Report: ݡ

ʲβˤĤǽ¤긭ĴȹͻԤ
AppliedMath7-Report-15
Ȥ̾Ĥ e-mail ˤƶ˥ݡȤȤФ. ʤݡȤ e-mail TeX Ǻ̤ˤФƤ褤.

Exercises:

  1. Emacs ʳɽˤĤƤʤ٤Ʊμ½ԤäƤߤ褦

  2. ܸޤǡѰդ, Emacs Ǥʤ٤Ʊμ½ԤäƤߤ褦



about Icons, ClipArts

For details, see JNorth_arrow-right-sm.png this.


*1 ǤСEmacs load-path ̤ä꤬ɤ
*2 (require 'visual-regexp) פʤϤʤưʤƤ
*3 ver.23 ǤȤ뤬ʬǥ󥹥ȡ뤷ʤȤʤ
*4 ܥڡźդƤ fileFakeNameGenerator.com_ab6e7cf9.zip ˴ޤޤƤǡƬ11ԤǤ롥ΥǡϡFake Name Generator ˤäƺ줿 Fake Name Generator identities ȸƤФֵʪθĿͥǡפǤꡢCreative Commons Attribution-Share Alike 3.0 United States License ˤäƥ饤󥹤ƤΤǤ.
*5 \b ñΤϤᤫ̣.
*6 ΥǡϡFake Name Generator ˤäƺ줿 Fake Name Generator identities ȸƤФֵʪθĿͥǡפǤꡢCreative Commons Attribution-Share Alike 3.0 United States License ˤäƥ饤󥹤ƤΤǤ.
*7 νǴʤƤ⡢ʣνȤ߹碌Ƥɤ.