Link to home
Start Free TrialLog in
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
ASKER CERTIFIED SOLUTION
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of faithless1
faithless1

ASKER

Thanks!