PerlNewUser
Technical User
Using something like this:
I want to add one or more spaces (and perhaps a period) between upper and lower case characters that touch each other, i.e.:
This is a blue widgetThis is a red widgetThis is a brown widget
should be:
Thus is a blue widget. This is a red widget. This is a brown widget
I have an Excel file that was exported as delimited text. One of the record fields contains product descriptions with sentences that run-on and connect to each other because much of the information was originally in bulleted lists that, after export, were converted into single, run-on sentences.
If there were periods or other common punctuation at the end of each sentence, I would be able to easily use them in the above pseudocode to accomplish what I need; but with just lc and uc characters touching, I am not sure of the best way to proceed, since Perl offers multiple options.
Thanks.
Code:
(pseudocode)
$line=~s/lcUC/lc uc/g;
I want to add one or more spaces (and perhaps a period) between upper and lower case characters that touch each other, i.e.:
This is a blue widgetThis is a red widgetThis is a brown widget
should be:
Thus is a blue widget. This is a red widget. This is a brown widget
I have an Excel file that was exported as delimited text. One of the record fields contains product descriptions with sentences that run-on and connect to each other because much of the information was originally in bulleted lists that, after export, were converted into single, run-on sentences.
If there were periods or other common punctuation at the end of each sentence, I would be able to easily use them in the above pseudocode to accomplish what I need; but with just lc and uc characters touching, I am not sure of the best way to proceed, since Perl offers multiple options.
Thanks.