Avatar of faithless1
faithless1

asked on 

Output Control

Hi,

The following script ads spaces around a specific match:

perl -pe 'BEGIN{$re=qr/@{[join"|",splice @ARGV]}/}s/($re)/ $1 /g' store

I'm looking for a way to specify controls so that spaces are not added around plural words:

example

wentstorestoday
wentstoretoday

The script will produce the following output:

went store s today
went store today

Is there a way to specify a plural to ignore?

Thanks
Perl

Avatar of undefined
Last Comment
faithless1
ASKER CERTIFIED SOLUTION
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of faithless1
faithless1

ASKER

Thanks!
Perl
Perl

Perl is a high-level, general-purpose, interpreted, dynamic programming languages with over 25 years of development. Perl 5 runs on over 100 platforms from portables to mainframes and is suitable for both rapid prototyping and large-scale development projects. Perl gained widespread popularity as a Common Gateway Interface (CGI) scripting language, in part due to its regular expression and string parsing abilities. In addition to CGI, Perl is used for graphics programming, system administration, network programming, finance, bioinformatics, and other applications.

26K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo