DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: replace text blocks  (Read 8,988 times)

kalos

  • Member
  • Joined in 2006
  • **
  • Posts: 1,824
replace text blocks
« on: February 29, 2008, 04:16 PM »
hello

can you tell me please a program that will batch replace text blocks in multiple files?

I know there are numerous that replace text, but I don;t know any for whole blocks of text (multi-line text, paragraph text)

also it should work with other than english characters


thanks
« Last Edit: February 29, 2008, 05:40 PM by kalos »

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: replace text blocks
« Reply #1 on: March 01, 2008, 12:43 AM »
What are the restrictions on the text blocks you want to replace? What kind of input format (raw .txt files, XML, ...) , what are the precise criteria of the text you want to replace, etc.

Probably some unicode-aware regular-expression text replacer can do the job.
- carpe noctem

kalos

  • Member
  • Joined in 2006
  • **
  • Posts: 1,824
Re: replace text blocks
« Reply #2 on: March 01, 2008, 12:50 AM »
I want to delete eg this text:
Code
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>

<hr class="hidden" />
<table id="footer" width="100%">
<tr>
<td>&copy; 

the files are html (that can obviously be considered as txt)

yes, a regex replacer would do that, but it's hard for me to turn the whole text block into single-line regex text, I just need to copy-paste the text block to the application :D


edit by jgpaiva: fixed code tag
« Last Edit: March 01, 2008, 01:28 AM by jgpaiva »

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: replace text blocks
« Reply #3 on: March 01, 2008, 12:58 AM »
Ah, so it's static blocks you want to replace? 100% exact, not even variety in ChArEcTEr CaSe?
- carpe noctem

kalos

  • Member
  • Joined in 2006
  • **
  • Posts: 1,824
Re: replace text blocks
« Reply #4 on: March 01, 2008, 01:09 AM »
yeap, exactly

I found "ALIAS Find and Replace" that supposedly does the job, but somehow it doesn't install on my pc

Darwin

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,985
    • Gathering Badge
Re: replace text blocks
« Reply #5 on: March 02, 2008, 02:31 PM »
Although this recent thread: http://www.donationcoder.com/forum/index.php?topic=12142.0 started as a request for a DC discount on PowerGrep, a number of alternatives - FOSS and shareware - were suggested. You'll probably find something there. In addition, there are a number of threads on this forum dealing with similar needs. Here is a small sampling of them:

http://www.donationcoder.com/forum/index.php?topic=9401.0
http://www.donationcoder.com/forum/index.php?topic=8612.0
http://www.donationcoder.com/forum/index.php?topic=5678.0
http://www.donationcoder.com/forum/index.php?topic=2929.0
http://www.donationcoder.com/forum/index.php?topic=11013.0





"Some people have a way with words, other people,... oh... have not way" - Steve Martin

Renegade

  • Tell me something you don't know...
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,291
    • Participated in NANY Challenge Three Times
    • Furry Fandom Badge - Furry Fandom
    • Linux User
Re: replace text blocks
« Reply #6 on: March 02, 2008, 02:50 PM »
PowerGrep will certainly do it, but is perhaps overkill for most people.

Most decent text editors will do this. Editplus does. Just use the "Replace in files" function. (Or whatever it's called --- similar to that anyways.)
Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689
Re: replace text blocks
« Reply #7 on: March 02, 2008, 03:02 PM »
« Last Edit: March 02, 2008, 03:12 PM by sri »

Original address: https://www.donationcoder.com/forum/index.php?topic=12536.0