[TxMt] Re: How to target specific fields for a "Change to Titlecase" in SQL

Nick ParadoxQuine at gmail.com
Mon Aug 11 23:16:39 UTC 2008


I can't help you with your question (not that great with regex's) but I
don't think you offended anyone, sometimes questions slip through
unanswered. not sure why.

On Mon, Aug 11, 2008 at 12:16 PM, John Stephens <john at designop.us> wrote:

> I posted the query below a few days ago and I'm wondering if I said
> something offensive-- I haven't heard any responses. My situation
> isn't dire, but if I violated list etiquette in some way, I'd like to
> learn from my mistake. If the question isn't within the scope of the
> list, that would be useful to know too.
>
> Thanks!
>
>
> > Hi, I'm new.
> >
> > I'm working on a custom Textpattern installation and my client has
> > entered a massive amount of text data in certain fields using
> > UPPERCASE. He wants the text displayed in Title Case instead, and he
> > doesn't want to manually change it. I can easily use the style
> > declaration "text-transform: capitalize;" for these elements, but my
> > client would very much prefer formal title case in which words such
> > as "the," "of," "and," and "for" are not capitalized. (I see that
> > Textmate's "Convert to Titlecase" command in the "Text" menu does
> > this correctly.)
> >
> > I have made a mysql dump of the database, but I'm not sure how to
> > isolate the appropriate data for a text transformation. Here is how
> > each individual record is formatted in the database:
> >
> > (91,'2008-08-03 05:20:57','author-username','2008-08-03
> > 05:26:33','','UPPERCASE DATA','','','','','','','UPPERCASE-DATA','',
> > 0,'Comment',0,4,1,1,'section-name','','lowercase-data','lowercase-
> > data','','','','','','','','','','','UPPERCASE DATA','','lowercase-
> > data','3p344629nn178n874sp2s222s0q3n072','2008-08-03')
> >
> > The mysql dump also contains uppercase terms such as "DROP TABLE IF
> > EXISTS" and lowercase terms like "datetime" and "varchar" that I
> > _don't_ want changed. Is there a simple way to target just the
> > UPPERCASE DATA fields enclosed in single quotes for a massive "Covert
> > to Titlecase"?
> >
> > I welcome advice from regular expression fu-masters and Textmate
> > adepts!
> >
> > Thanks in advance!
> > John Stephens
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20080811/54a1d13c/attachment.html>


More information about the textmate mailing list