bd on 30 Mar 2003 03:12:01 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [spoon-discuss] Re: [Spoon-business] poooooints


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday 29 March 2003 09:34 pm, Baron von Skippy wrote:
> >Well, it's certainly more interesting than s/(.)\1+/\1/g...
> >- --
> >bd
>
> -Is that L33t or BF? Either way, what in blazes did you just say?-

Regular expression. Basically, if you have a character, followed by one or 
more of itself, replace it with itself:

s/ <--- replace
(.) <--- match anything, store it in first backreference
\1 <--- first backref
+ <--- one or more
/ <--- replace with
\1 <--- first backref
/g <--- match more then once per line
- -- 
bd
Chihuahuas drive me crazy.  I can't stand anything that shivers when it's 
warm.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+hmBjx533NjVSos4RAiUqAKDC6XIQE1zEcOYnHp0DNbcBb2ktkQCgkqHN
af3K9Gvl1JLb1bCOpLyDXLU=
=lMcn
-----END PGP SIGNATURE-----
_______________________________________________
spoon-discuss mailing list
spoon-discuss@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss