Post #248,405
3/18/06 11:13:19 AM
|
All in good fun.
Hugs, Amy
"It's never too late to be who you might have been." ~ George Eliot
|
Post #248,411
3/18/06 3:37:11 PM
|
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]
|
Post #248,759
3/21/06 5:37:26 PM
|
You need to get yourself another hobby :-)
Follow your MOUSE
|
Post #248,807
3/22/06 2:50:35 AM
|
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!
|
Post #248,838
3/22/06 9:51:11 AM
|
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
|
Post #248,840
3/22/06 10:03:38 AM
|
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.
|
Post #248,860
3/22/06 12:02:58 PM
|
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]
|
Post #248,874
3/22/06 12:41:07 PM
|
In csh/edlin/vi/bash or some other line interpreter, no?
|
Post #248,881
3/22/06 1:13:18 PM
|
Yup
===
Purveyor of Doc Hope's [link|http://DocHope.com|fresh-baked dog biscuits and pet treats]. [link|http://DocHope.com|http://DocHope.com]
|
Post #248,856
3/22/06 11:28:56 AM
|
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]
|
Post #248,921
3/22/06 6:11:50 PM
|
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]. :-)
|
Post #248,922
3/22/06 6:18:50 PM
|
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!
|
Post #248,923
3/22/06 6:21:59 PM
|
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]
|
Post #248,933
3/22/06 7:42:02 PM
|
admin is one crazy cat.
|