Hello Monks,
I have some doubts regarding a regex on how to deal with white spaces and new lines. I have tried some code but none of them are working. (I am not that good in Programming or Perl but I am trying to do this hopefully in Perl).
Actually, I want to take out all the white spaces(spaces & tabs). Also If we have more than two newlines between each paragraph we should reduce it to two new lines.
This is a sample input,
START:The Product Manager is a deep expert on specific feature(s), ser +vice(s) or interface(s) that Mimecast provides or sells. This could +be a service delivered through the cloud, or installable software tha +t customers will use on their computers, SmartPhones, tablets and sim +ilar devices. For each product under your remit, you will have a good understanding +of the competitors in the market and their pricing, as well as the re +levance of the feature to IT administrators, users and customers. Yo +u will use this knowledge to formulate a roadmap of feature enhanceme +nts or, if required, the development of entirely new products and ser +vices. If this sounds like you, then please read on….. You will be required to spend time sharing ideas and product concepts +with customers to gauge feedback, honing the feature pitch, and using + this information to assist the Product Director with pricing deliber +ations. Your role will see you managing development through the entire develop +ment lifecycle, whereafter you will be responsible for launching impr +ovements to Mimecast internally on a global scale. You will be comfo +rtable assisting with the authoring of collateral for web-sites, prin +table assets and to be integrated into appropriate media packs. You will take strategic guidance from your line manager, the product d +irector, and will work closely with the technical product managers on + the team to ensure products are delivered on time. :END
This is the desired output,
START:The Product Manager is a deep expert on specific feature(s), ser +vice(s) or interface(s) that Mimecast provides or sells. This could +be a service delivered through the cloud, or installable software tha +t customers will use on their computers, SmartPhones, tablets and sim +ilar devices. For each product under your remit, you will have a good understanding +of the competitors in the market and their pricing, as well as the re +levance of the feature to IT administrators, users and customers. Yo +u will use this knowledge to formulate a roadmap of feature enhanceme +nts or, if required, the development of entirely new products and ser +vices. If this sounds like you, then please read on….. You will be required to spend time sharing ideas and product concepts +with customers to gauge feedback, honing the feature pitch, and using + this information to assist the Product Director with pricing deliber +ations. Your role will see you managing development through the entire develop +ment lifecycle, whereafter you will be responsible for launching impr +ovements to Mimecast internally on a global scale. You will be comfo +rtable assisting with the authoring of collateral for web-sites, prin +table assets and to be integrated into appropriate media packs. You will take strategic guidance from your line manager, the product d +irector, and will work closely with the technical product managers on + the team to ensure products are delivered on time.:END
Please help monks.
Thanks in advance.
In reply to How to remove white space and more than a particular number of new lines! by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |