RegExps - laatste loodjes
Floris Lambrechts
vertaling@nl.linux.org
Wed, 17 May 2000 17:48:18 +0200
Mijn vertaling is af, maar nog een paar dingetjes ik niet. Kan iemand (met
ervaring in reguliere expressies) eens uitleggen wat hier bedoeld wordt aub?
===============
To do editing you will need an editor like vi, emacs or you can use e.g perl.
In emacs you use M-x query-replace-regexp or you can put the
query-replace-regexp command on some function key. Alternatively you can also
use the command replace-regexp. The query-replace-regexp is interactive, the
other not. In vi the substitution command :%s/ / /gc is used. The percent
refers to the ex-range 'whole file' and can be replaced by any appropriate
range. E.g in vim you type shift-v, mark an area and then use the substitution
on that area only.
================
?? => (vi) ex-range 'whole file'
================
(Hier moeten de spaties worden verwijderd die op het begin van de regel staan)
3412 Bob 123
3834 Jonny 333
12248 Kate 634
14223 Tony 567
2567 Peter 435
3567 Alice 535
15248 Kerry 534
This should correct it:
vi: s/^ *// (There is 2 spaces as we do not have a +)
emacs: '^ +' replaced by the empty string
perl: perl -pe 's/^ +//' phonelist.txt
==================
?? => There is 2 spaces as we do not have a +
Ik denk dat dit betekent dat je 2 spaties moet gebruiken omdat het + hier niiet
zou werken (in vi dus)?
===================
There are also more special characters like e.g the alteration
===================
??=> wat is dat, alteration?
Bedankt
Floris
--
floris.lambrechts@linuxfocus.org
http://www.linuxfocus.org
--
Open Source Software vertaalproject, vertaling@nl.linux.org
web: http://vertaling.nl.linux.org/
archief mailinglist: http://mail.nl.linux.org/vertaling/