home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.slackware      I think its the one without Selinux crap      87,272 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 86,783 of 87,272   
   Joseph Rosevear to Petri Kaukasoina   
   Re: regex question   
   11 Oct 24 06:49:25   
   
   From: Mail@JoesLife.org   
      
   On Sat, 28 Sep 2024 08:55:26 -0000 (UTC), Petri Kaukasoina wrote:   
      
   > Joseph Rosevear   wrote:   
   >>   :%s///g   
   >   
   > Try sed:   
   > sed -i.bak 's///g' *.html   
   >   
   > Or, if you prefer vi:   
   > :%s///g   
   >   
   > They won't work if the comment is more then one line long.   
      
   Thanks.  I got it working in JOE (Joe's Own Editor), which is my   
   preferred editor.  That helped, using a familiar tool.  I didn't know it   
   could do regex.  Here's what I used:   
      
      ^ku                go to the top of the file   
      ^kf                find   
                    the thing to find   
      r                  replace   
                the replacement thing   
      y                  "yes" do the replace, and find the next match   
      
   I decided to remove the leading space from the search.  I noticed that   
   that you put it in the parentheses like this:   
      
      \( .*\)   
      
   Perhaps I'll need that some day.   
      
   Note that in JOE "^y" is shorthand for "\(.*\)".   
      
   Thanks.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca