Give us a seminar, lecture or lesson on what your 'thing' is. Now with our exclusive ASK-A-NERD!!!
-
Gawdzilla Sama
- Stabsobermaschinist
- Posts: 151265
- Joined: Thu Feb 26, 2009 12:24 am
- About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
- Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
-
Contact:
Post
by Gawdzilla Sama » Fri Feb 15, 2013 8:28 pm
klr wrote:That list of "supporting software" is incomplete. Almost all programming/HTML editors should support regular expressions, either out of the box, or via plugins.
I quite like Textpad, but it hasn't been updated since 2009. I haven't looked to see if it does regular expressions.
It also doesn't cover programming language support for regular expressions, which is very widespread. There could be situations where that would come in very handy indeed.
"Software can't hurt hardware." Repeat as needed.
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”
-
klr
- (%gibber(who=klr, what=Leprageek);)
- Posts: 32964
- Joined: Wed Mar 04, 2009 1:25 pm
- About me: The money was just resting in my account.
- Location: Airstrip Two
-
Contact:
Post
by klr » Fri Feb 15, 2013 8:33 pm
Gawdzilla Sama wrote:klr wrote:That list of "supporting software" is incomplete. Almost all programming/HTML editors should support regular expressions, either out of the box, or via plugins.
I quite like Textpad, but it hasn't been updated since 2009. I haven't looked to see if it does regular expressions.
The computer says "yes":
http://www.textpad.com/products/textpad/features.html
Gawdzilla Sama wrote:
It also doesn't cover programming language support for regular expressions, which is very widespread. There could be situations where that would come in very handy indeed.
"Software can't hurt hardware." Repeat as needed.
Actually, that's not true in all cases*, but it is true for this sort of work.
*"Bricking" devices via software is possible in some scenarios, but only some.
God has no place within these walls, just like facts have no place within organized religion. - Superintendent Chalmers
It's not up to us to choose which laws we want to obey. If it were, I'd kill everyone who looked at me cock-eyed! - Rex Banner
The Bluebird of Happiness long absent from his life, Ned is visited by the Chicken of Depression. - Gary Larson

-
Gawdzilla Sama
- Stabsobermaschinist
- Posts: 151265
- Joined: Thu Feb 26, 2009 12:24 am
- About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
- Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
-
Contact:
Post
by Gawdzilla Sama » Fri Feb 15, 2013 8:39 pm
Yeah, I noted the tick box in the search pop-up.
As for the hardware, I know better.

Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”
-
Pappa
- Non-Practicing Anarchist

- Posts: 56488
- Joined: Wed Feb 18, 2009 10:42 am
- About me: I am sacrificing a turnip as I type.
- Location: Le sud du Pays de Galles.
-
Contact:
Post
by Pappa » Fri Feb 15, 2013 9:06 pm
Zilla, Textpad has an excellent regular expression engine. When I've tidied up hundreds of files in the past, I usually do it in small steps on all the files simultaneously, checking I haven't fucked anything up as I go along. It's probably best you only work on open files at first, so you can undo any changes if required.
-
Gawdzilla Sama
- Stabsobermaschinist
- Posts: 151265
- Joined: Thu Feb 26, 2009 12:24 am
- About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
- Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
-
Contact:
Post
by Gawdzilla Sama » Fri Feb 15, 2013 9:09 pm
Pappa wrote:Zilla, Textpad has an excellent regular expression engine. When I've tidied up hundreds of files in the past, I usually do it in small steps on all the files simultaneously, checking I haven't fucked anything up as I go along. It's probably best you only work on open files at first, so you can undo any changes if required.
I mostly want to get table cells to be on one line so I can do the indexing easier. Right now it's del/backspace/del/backspace, and so on.
And I'd also like to automate the blank space removal around the ">" and "<".
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”
-
Pappa
- Non-Practicing Anarchist

- Posts: 56488
- Joined: Wed Feb 18, 2009 10:42 am
- About me: I am sacrificing a turnip as I type.
- Location: Le sud du Pays de Galles.
-
Contact:
Post
by Pappa » Fri Feb 15, 2013 9:18 pm
To get table cells on one line:
Search:
/td>\s*\n?\s*<td
Replace:
/td><td
That should catch most of them.
-
Pappa
- Non-Practicing Anarchist

- Posts: 56488
- Joined: Wed Feb 18, 2009 10:42 am
- About me: I am sacrificing a turnip as I type.
- Location: Le sud du Pays de Galles.
-
Contact:
Post
by Pappa » Fri Feb 15, 2013 9:21 pm
Careful trimming whitespace after a >. You might remove spaces between words unintentionally.
-
Gawdzilla Sama
- Stabsobermaschinist
- Posts: 151265
- Joined: Thu Feb 26, 2009 12:24 am
- About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
- Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
-
Contact:
Post
by Gawdzilla Sama » Fri Feb 15, 2013 9:26 pm
Pappa wrote:Careful trimming whitespace after a >. You might remove spaces between words unintentionally.
How about I just remove whitespace between > and < ?
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”
-
Pappa
- Non-Practicing Anarchist

- Posts: 56488
- Joined: Wed Feb 18, 2009 10:42 am
- About me: I am sacrificing a turnip as I type.
- Location: Le sud du Pays de Galles.
-
Contact:
Post
by Pappa » Fri Feb 15, 2013 10:23 pm
Gawdzilla Sama wrote:Pappa wrote:Careful trimming whitespace after a >. You might remove spaces between words unintentionally.
How about I just remove whitespace between > and < ?
Nope. That's where the space you want to keep could be.
-
Gawdzilla Sama
- Stabsobermaschinist
- Posts: 151265
- Joined: Thu Feb 26, 2009 12:24 am
- About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
- Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
-
Contact:
Post
by Gawdzilla Sama » Fri Feb 15, 2013 10:38 pm
Pappa wrote:Gawdzilla Sama wrote:Pappa wrote:Careful trimming whitespace after a >. You might remove spaces between words unintentionally.
How about I just remove whitespace between > and < ?
Nope. That's where the space you want to keep could be.
But if there's nothing but whitespace between them? </td> ..........</tr>, where the dots are whitespaces?
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”
-
Pappa
- Non-Practicing Anarchist

- Posts: 56488
- Joined: Wed Feb 18, 2009 10:42 am
- About me: I am sacrificing a turnip as I type.
- Location: Le sud du Pays de Galles.
-
Contact:
Post
by Pappa » Fri Feb 15, 2013 11:36 pm
If it's only between the various table tags, that'll be fine, but don't do it for inline text tags.
-
Gawdzilla Sama
- Stabsobermaschinist
- Posts: 151265
- Joined: Thu Feb 26, 2009 12:24 am
- About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
- Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
-
Contact:
Post
by Gawdzilla Sama » Fri Feb 15, 2013 11:50 pm
Pappa wrote:If it's only between the various table tags, that'll be fine, but don't do it for inline text tags.
I'll have to find that regex and see what it can do.

Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”
-
Pappa
- Non-Practicing Anarchist

- Posts: 56488
- Joined: Wed Feb 18, 2009 10:42 am
- About me: I am sacrificing a turnip as I type.
- Location: Le sud du Pays de Galles.
-
Contact:
Post
by Pappa » Sat Feb 16, 2013 1:16 am
You can install HTML Tidy as a Textpad addon. It will do a fair bit of the work for you.
-
Gawdzilla Sama
- Stabsobermaschinist
- Posts: 151265
- Joined: Thu Feb 26, 2009 12:24 am
- About me: My posts are related to the thread in the same way Gliese 651b is related to your mother's underwear drawer.
- Location: Sitting next to Ayaan in Domus Draconis, and communicating via PMs.
-
Contact:
Post
by Gawdzilla Sama » Sat Feb 16, 2013 3:46 am
Pappa wrote:You can install HTML Tidy as a Textpad addon. It will do a fair bit of the work for you.
Except it don't work.
Ein Ubootsoldat wrote:“Ich melde mich ab. Grüssen Sie bitte meine Kameraden.”
-
Jason
- Destroyer of words
- Posts: 17782
- Joined: Sat Apr 16, 2011 12:46 pm
-
Contact:
Post
by Jason » Sat Feb 16, 2013 4:12 am
Image removed by Ayaan. Don't post NSFW photos in a non-NSFW area, please.
Users browsing this forum: No registered users and 2 guests