Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 11, 2016, 04:06:28 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: replace text blocks  (Read 3900 times)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,477
    • View Profile
    • Donate to Member
replace text blocks
« on: February 29, 2008, 10:16:37 AM »
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, 11:40:06 AM by kalos »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: replace text blocks
« Reply #1 on: February 29, 2008, 06:43:31 PM »
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
  • **
  • default avatar
  • Posts: 1,477
    • View Profile
    • Donate to Member
Re: replace text blocks
« Reply #2 on: February 29, 2008, 06:50:12 PM »
I want to delete eg this text:
</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: February 29, 2008, 07:28:39 PM by jgpaiva »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: replace text blocks
« Reply #3 on: February 29, 2008, 06:58:29 PM »
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
  • **
  • default avatar
  • Posts: 1,477
    • View Profile
    • Donate to Member
Re: replace text blocks
« Reply #4 on: February 29, 2008, 07:09:39 PM »
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,984
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: replace text blocks
« Reply #5 on: March 02, 2008, 08:31:24 AM »
Although this recent thread: http://www.donationc...ex.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.donationc...dex.php?topic=9401.0
http://www.donationc...dex.php?topic=8612.0
http://www.donationc...dex.php?topic=5678.0
http://www.donationc...dex.php?topic=2929.0
http://www.donationc...ex.php?topic=11013.0





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

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,220
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: replace text blocks
« Reply #6 on: March 02, 2008, 08:50:25 AM »
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: 677
    • View Profile
    • Sridhar Katakam
    • Read more about this member.
    • Donate to Member
Re: replace text blocks
« Reply #7 on: March 02, 2008, 09:02:17 AM »
<a href="https://sridharkatakam.com">My blog</a>
« Last Edit: March 02, 2008, 09:12:42 AM by sri »