IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Think it originated in SED (Shell Editor)
Lot's of languages have borrowed and extended the original SED expressions, but the original was just a text editor without a menu system, so if you wanted to do text substitution, you had to issue a s(ubstitution) command.

Might I suggest some light reading on SED - [link|http://onestepback.org/articles/poly/sed.html|Scott's helpful SED scripts]. :-)

New sed (lower case please) is the Stream EDitor.
And the phrase you're all looking for is "regular expression".


Peter
[link|http://www.no2id.net/|Don't Let The Terrorists Win]
[link|http://www.kuro5hin.org|There is no K5 Cabal]
[link|http://guildenstern.dyndns.org|Home]
Use P2P for legitimate purposes!
New Stream EDitor
[link|http://www.cornerstonemag.com/sed/|http://www.cornerstonemag.com/sed/]

And I believe you're right:
s/regular expression/replacement/flags
Substitute the replacement string for instances of the regular expression in the pattern space. Any character other than backslash or newline can be used instead of a slash to delimit the RE and the replacement. Within the RE and the replacement, the RE delimiter itself can be used as a literal character if it is preceded by a backslash. An ampersand (&) appearing in the replacement will be replaced by the string matching the RE. The special meaning of "&" in this context can be suppressed by preceding it by backslash. The characters \\n, where n is a digit, will be replaced by the text matched by the corresponding backreference expression. For each backslash (\\) encountered in scanning replacement from beginning to end, the following character loses its special meaning (if any). It is unspecified what special meaning is given to any character other than &, \\ or digits. A line can be split by substituting a newline character into it. The application must escape the newline character in the replacement by preceding it by backslash. A substitution is considered to have been performed even if the replacement string is identical to the string that it replaces. The value of flags must be zero or more of:

n
Substitute for the nth occurrence only of the regular expression found within the pattern space.
g
Globally substitute for all non-overlapping instances of the regular expression rather than just the first one. If both g and n are specified, the results are unspecified.
p
Write the pattern space to standard output if a replacement was made.
w wfile
Write. Append the pattern space to wfile if a replacement was made.

--
Steve
[link|http://www.ubuntulinux.org|Ubuntu]
New admin is one crazy cat.
     Bagpipes! In our lobby! - (jb4) - (46)
         Don't look under the Kilt. -NT - (folkert)
         Yes, but it wasn't until the 20th century . . . - (Andrew Grygus) - (1)
             WMD: Weapons of Mass Dyspepsia -NT - (jb4)
         Bagpipes should NOT be played indoors - (ben_tilly) - (4)
             They come in all sizes I guess - (tuberculosis) - (1)
                 They do - (ben_tilly)
             I took a math test once in college - (admin)
             s/enemy/cat/ -NT - (pwhysall)
         Makes ya want to eat a steaming plate of haggis :-D -NT - (imqwerky) - (37)
             It does? - (Andrew Grygus) - (4)
                 Why is that? -NT - (Another Scott) - (3)
                     Illegal because the sound the sheep makes when lungs... - (ChrisR) - (2)
                         Rarely do I actually LOL ... but that one got me -NT - (drewk) - (1)
                             ObAOL. -NT - (Another Scott)
             Haggis is Scottish. Corned beef & cabbage is Irish -NT - (jb4) - (31)
                 Corned beef and cabbage is as Irish . . . - (Silverlock)
                 Yes, haggis is Scottish...Are you saying bagpipes are *not*? -NT - (CRConrad) - (12)
                     They were "imported" - (jb4) - (9)
                         What I meant was, WTF does your reply to Amy mean? - (CRConrad) - (8)
                             He probably had Ireland on his brain because of... - (ben_tilly) - (7)
                                 yea, people at work said I wasnt wearing green - (boxley) - (2)
                                     Revealing your green teeth? - (imqwerky) - (1)
                                         use the same dentist as Muqtada al Sadr -NT - (boxley)
                                 Duh! Sorry JayBee, sorry Ben. :-(How *stupid* of me!)-: - (CRConrad) - (3)
                                     Must have been something about 3/17. - (Another Scott)
                                     too much blood in the alchohol stream -NT - (boxley) - (1)
                                         I concur! -NT - (jb4)
                     No. AFAIK, they're originally Irish - (ben_tilly) - (1)
                         *SIGH*. If you absolutely *have* to brag with your trivia... - (CRConrad)
                 Okay, potatoes and soda bread then. - (imqwerky) - (16)
                     Don't let the pitnickers get you down. :-) -NT - (Another Scott) - (14)
                         All in good fun. - (imqwerky) - (13)
                             All in? Good. Fun! - (drewk) - (12)
                                 You need to get yourself another hobby :-) -NT - (bionerd) - (11)
                                     s/another/a/ -NT - (pwhysall) - (10)
                                         You know I dont have a clue what you people are saying - (bionerd) - (9)
                                             s/x/y/ - (Another Scott) - (3)
                                                 That code isn't pseudo - (drewk) - (2)
                                                     In csh/edlin/vi/bash or some other line interpreter, no? -NT - (Another Scott) - (1)
                                                         Yup -NT - (drewk)
                                             ICLRPD (new thread) - (lincoln)
                                             Think it originated in SED (Shell Editor) - (ChrisR) - (3)
                                                 sed (lower case please) is the Stream EDitor. - (pwhysall)
                                                 Stream EDitor - (Steve Lowe)
                                                 admin is one crazy cat. -NT - (Another Scott)
                     There is NOTHING funny about haggis... - (jb4)

This movie doesn't scrape the bottom of the barrel. This movie isn't the bottom of the barrel. This movie isn't below the bottom of the barrel. This movie doesn't deserve to be mentioned in the same sentence with barrels.
90 ms