K
K
ksvdon2014-02-02 23:07:56
Perl
ksvdon, 2014-02-02 23:07:56

perl script. Regular expressions for searching and replacing strings

for( $st ){
s/^\s+//; #What exactly
s/\s+$//; #do these lines
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Belov, 2014-02-02
@Andrey_Belov

Remove whitespace characters (\s+) from the beginning (^) and end ($) of a string.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question