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 All in good fun.
Hugs,
Amy

"It's never too late to be who you might have been." ~ George Eliot
New All in? Good. Fun!
Yet more Fun With Punctuation™.
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New You need to get yourself another hobby :-)
Follow your MOUSE
New s/another/a/


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 You know I dont have a clue what you people are saying
When you talk in code. I just smile and nod.
Follow your MOUSE
New s/x/y/
(I think) Means:

substitute "x" with "y"

Thus, "You need to get yourself another hobby :-)" when operated on the pseudo-code s/another/a/ becomes "You need to get yourself a hobby :-)"

HTH.

Cheers,
Scott.
New That code isn't pseudo
That's exactly what you would enter to do the replacement. (BTW you're right about what it does.)
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New In csh/edlin/vi/bash or some other line interpreter, no?
New Yup
===

Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats].
[link|http://DocHope.com|http://DocHope.com]
New ICLRPD (new thread)
Created as new thread #248855 titled [link|/forums/render/content/show?contentid=248855|ICLRPD]
lincoln

"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from." -- E.L. Doctorow


Never apply a Star Trek solution to a Babylon 5 problem.


I am not merely a "consumer" or a "taxpayer". I am a Citizen of the United States.


[link|mailto:bconnors@ev1.net|contact me]
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)

When you make someone eat shit, feed it to them with the right fork.
76 ms