Jump to content

How to erase parts of lines of an entire file?

- - - - -

  • Please log in to reply
3 replies to this topic

#1
onething

onething

    Programmer

  • Members
  • PipPipPipPip
  • 118 posts
I have a list of lines that say things like:

aaa|x
bbb|x
ccc|x

I would like to get rid of the |x in all the lines.

How would I do this in:

OpenOffice
RegExbuddy
Textpipe Pro
WinAutomation
Edit Pad Pro
Wordpad

What kind of macro is this called, because I can't make head or tail of the meanings in the macro manuals and I don't think any of them allow this kind of stuff. I would imagine there's a really easy way to do this in OpenOffice, and that in RegExbuddy you have to know regex I certainly do not. There must be really cool ways to do it in Textpipe Pro etc, but I haven't the slightest clue!

#2
onething

onething

    Programmer

  • Members
  • PipPipPipPip
  • 118 posts
Ok, I see all I have to do is replace all the |x's, but for next time when I need to erase varying values but which are positioned in the same place in the lines, like:

|x
|y
|z

What would I do then?

#3
lethalwire

lethalwire

    while(false){ ... }

  • Members
  • PipPipPipPipPipPipPip
  • 748 posts
  • Programming Language:Java, PHP
  • Learning:Java, PHP
It's called Block Selection.
Comparison of text editors - Wikipedia, the free encyclopedia

I hope that helps.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
In jEdit, I would do a search and replace.

Search: \|.$

Replace:
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users