those frelling hyphenations are driving this archivist bonkers
What app is it you're using to search, and can it use regexes?
Because I have a regex for multiple-hyphenated phrases right here, AIFG!
Mal ,'Bushwhacked'
Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.
those frelling hyphenations are driving this archivist bonkers
What app is it you're using to search, and can it use regexes?
Because I have a regex for multiple-hyphenated phrases right here, AIFG!
Or, of course, he said coming back from the coffee machine, a regex for "any phrase over 50 chars not containing whitespace gets a linebreak at char 51" would be easy.
I was hoping you'd say something like that.
Right now I'm just doing it in a browser window. I set my preferences to download, say, a thousand posts at a time, then if my horizontal scroll bar appears, I search through that batch of posts in smaller chunks until I find the offending hyphenations. What I need to know is not only what long hyphenations there are, but also what post they're in so I can edit them.
Or, of course, he said coming back from the coffee machine, a regex for "any phrase over 50 chars not containing whitespace gets a linebreak at char 51" would be easy.
Yeah, it's not always hyphenations, sometimes youjustgetwordsstrungtogetheryouknow?
I have Perl, not sure what other programs I have that would be suitable.
edit: And editing by hand is fine, because there aren't that many instances (15-20), and that way you can place the break where it makes sense.
I have Perl, not sure what other programs I have that would be suitable.
Obviously Perl would do it, but Homesite and Dreamweaver have regex support. Then there are things like Ultra-edit and whatever.
With Perl you can do it with a quick oneliner, using the -i flag.
Let me play just a little...
I have Homesite 4.5.
I'll trying and find my copy of homesite and see what the syntax is.
But, here's something you could try. From the commandline, doing this:
perl -p -i.bak -e 's/(\\S{50})/$1n/' longstrings.txt
will put a linebreak after the fiftieth character of any line of longstrings.txt which contains fifty non-whitespace characters without a break.
Of course it won't wrap it neatly at the nearest hyphen, and it doesn't fix lines with more than 100 chars in a row, (run it twice!) but it's better than nothing.
Oh and it makes a backup file of course, called longstrings.txt.bak -- Perl, is there anything it can't do?
The code for "a pattern of fifty non-spaces in a row" in Homesite is the very beautiful:
([^[:space:]]{50})
so if you choose "extended Replace", check the Regular Expressions box then replace the above code with
\\1
followed by a return, that will hard-wrap, in a rather brutal way, all 50-character strings, putting a line break after char 50.
I'll give it a try.
Hi, there's a wonderful new article by Gothic Miss Manners (posted in Press today) about etiquette on boards, and newbies and old-bies, and I thought it might make a good addition or link to the Buffista main FAQ. FYI.