I'm trying to write a simple command line script to fix some white space and with two tabs Location events need to be changed, but only if it appears at the beginning of the line (prefix only by other tabs).
I My only thought was that he had to use a perspective, but this variable may not be length. I want to be open for a non-reggae solution if at least one quick command line is fit in the script. For reference, the existing Perl script is being implemented in this way: check until there is no change By that time, you can use s / ^ (\ t *) / / 1 \ t / g; If I run through several passes, then it works perfectly, but I do not have enough information about Pearl, unless there is a change in the string, or if it is a regular Expression is
perl -pe 's / ^ (\ t *) / $ 1 \ t / G> '
1 to repeat the pattern while s / ^ (\ t *) / $ 1 \ t / g; left to create
Comments
Post a Comment