We help IT Professionals succeed at work.

For Sapa

klopter
klopter asked
on
perl -pe "s/^(?:[^\t]*\t?){1,2}//" permissions.dat > output_file

I'll give you the same deal that I offered monas.  I'll give you a few points if you can explain your code.
Take a look at that
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=perl&qid=20231109
to see the parts that I already understand.

Thanks,
  Ken

Comment
Watch Question

Commented:
^ - match if begin of line
(?: ) - group subexpression into one cluster like () , but DO NOT capture matching substring.
[^\t] - match if any symbol EXCEPT tab.
* - previous term may occurs 0 or more times. It is "greedy" function,
so it will match as many characters as possible.
\t - match if tab.
? - previous term may occurs 0 or 1 times.
{1,2} - previous term (grouped subexpression in our example) may occurs NOT LESS than 1 but NOT MORE than 2 times.

Author

Commented:
Thanks,
  Sorry for the delay.

Ken

Explore More ContentExplore courses, solutions, and other research materials related to this topic.