Hi everyone,
Looking for some help with the following.
I have a file of 30 columns separated by pipes "|" and I want to have a macro to convert to upper case only first
letter of every word but only within 3rd column. The sample file only of 4 columns would be:
The desired output is:
PRODUCT No.|DESCRIPTION|SCIENCE BOOKS|SOME OTHER DATA|
Product 1|Blah blah blah|Philosophiae Naturalis Principia Mathematica (1687)|Some other data|
PRODUCT 2|Blah blah blah|Dialogue Concerning The Two Chief World Systems (1632)|Some other data|
PRODUCT 3|Blah blah blah|De Revolutionibus Orbium Coelestium (1543)|Some other data|
PRODUCT 4|Blah blah blah|The Voyage Of The Beagle (1845)|Some other data|
My idea is:
1-) Match the text between "|" in column 3;
2-) Convert to lower case all text matched in column 3; (Once text is matched I would apply "ToLower" over the regexp)
2-) Convert to lower case only first letter of every word within 3rd column. (Once text is matched I would apply "ToUpper" over the regexp)
I now the regexp \b[A-Za-z] matches first letter of every word, but I don't know how to match only the text in 3rd column.
I think this coud be in script, but I would like to do it through a macro to learn how using the correct Regexp, because I've been trying
to build a good regexp, but I can get it.
I'm trying in Perl style regexp with "\|([^|]*)\|" but this look that matches every 2 columns and not only third one.
Any help would be very appreciated.
Regards.
Looking for some help with the following.
I have a file of 30 columns separated by pipes "|" and I want to have a macro to convert to upper case only first
letter of every word but only within 3rd column. The sample file only of 4 columns would be:
Code: Select all
PRODUCT No.|DESCRIPTION|SCIENCE BOOKS|Some other data|
Product 1|Blah blah blah|PHILOSOPHIAE NATURALIS PRINCIPIA MATHEMATICA (1687)|Some other data|
Product 2|blah blah blah|Dialogue concerning the two chief world systems (1632)|Some other data|
Product 3|blah blah blah|De Revolutionibus Orbium Coelestium (1543)|Some other data|
Product 4|blah blah blah|the voyage of the beagle (1845)|Some other data|
PRODUCT No.|DESCRIPTION|SCIENCE BOOKS|SOME OTHER DATA|
Product 1|Blah blah blah|Philosophiae Naturalis Principia Mathematica (1687)|Some other data|
PRODUCT 2|Blah blah blah|Dialogue Concerning The Two Chief World Systems (1632)|Some other data|
PRODUCT 3|Blah blah blah|De Revolutionibus Orbium Coelestium (1543)|Some other data|
PRODUCT 4|Blah blah blah|The Voyage Of The Beagle (1845)|Some other data|
My idea is:
1-) Match the text between "|" in column 3;
2-) Convert to lower case all text matched in column 3; (Once text is matched I would apply "ToLower" over the regexp)
2-) Convert to lower case only first letter of every word within 3rd column. (Once text is matched I would apply "ToUpper" over the regexp)
I now the regexp \b[A-Za-z] matches first letter of every word, but I don't know how to match only the text in 3rd column.
I think this coud be in script, but I would like to do it through a macro to learn how using the correct Regexp, because I've been trying
to build a good regexp, but I can get it.
I'm trying in Perl style regexp with "\|([^|]*)\|" but this look that matches every 2 columns and not only third one.
Any help would be very appreciated.
Regards.