L
Leo Shumacher
Hi,
I have a project due today and am struggling with this line:
s/[,;:!\?\.\"\\\/\]\[]{1,}/ /g;
I am trying to replace the following characters with whitespace (These
are word separators and I'm writing a word-counting program. I am
having trouble figuring out which of those characters need a '\' in
front of them, since perl doesn't give me an error even with -w when I
don't use them in the right places.. Here are the characters in a more
accesible format:
,;:! --> These don't need a '\' in front (I think)
?."\/][ --> These all need it?
@ # $ % ^ & * ( ) + - = ~ ` { } < > | --> These I am not sure about.
Please help!
I have a project due today and am struggling with this line:
s/[,;:!\?\.\"\\\/\]\[]{1,}/ /g;
I am trying to replace the following characters with whitespace (These
are word separators and I'm writing a word-counting program. I am
having trouble figuring out which of those characters need a '\' in
front of them, since perl doesn't give me an error even with -w when I
don't use them in the right places.. Here are the characters in a more
accesible format:
,;:! --> These don't need a '\' in front (I think)
?."\/][ --> These all need it?
@ # $ % ^ & * ( ) + - = ~ ` { } < > | --> These I am not sure about.
Please help!