Sorry �� ��������, ��� ��� regexp oops�� �� �������� �������� :-)


On Thu, Nov 09, 2000 at 03:58:01PM +0200, Alexandr Belonogov wrote:
> ��� �������� �� man regexp
������ man� �� Linux ����������. 
> In general there may be more than one way to match a regular expression to an
> input string.  For example,  consider the command
>               regexp  (a*)b*  aabaaabb  x  y
> Considering only the rules given so far, x and y could end up with the values
> aabb and aa, aaab and aaa, ab and a, or any of several other combinations.
REGULAR EXPRESSION SYNTAX
     A regular expression is zero or more branches, separated by `|'.  It
     matches anything that matches one of the branches.  
     A branch is zero or more pieces, concatenated.  It matches a match for
     the first, followed by a match for the second, etc.  
     A piece is an atom possibly followed by `*', `+', or `?'.  An atom fol-
     lowed by `*' matches a sequence of 0 or more matches of the atom.  An
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
�.�. n* ��� �����, n, nn, nnnn
� .* ��� ����� ������ ����������� 0 � ����� ��� 
�.�. n*.* ����� ���� ���� sssss
     atom followed by `+' matches a sequence of 1 or more matches of the atom.
     An atom followed by `?' matches a match of the atom, or the null string.

� ��� � ������:
linux:~/Mail> cat >test
aaaa
bbbb
nffff
nnnnnn
bas
linux:~/Mail> grep '^n*.*' test 
aaaa
bbbb
nffff
nnnnnn
bas
linux:~/Mail> 

���������� ���������� ��������� ��������� �� � ���� ������ ������� :-)
��������� ����������, man etc. �� ����� ������ regexp ���� �����, ���
�� ������ ��� �� DOS/Windows/NT. �� �� ���� �������. ��� �� ����
���������� �������.

-- 
Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga", 
Sochi, Russia
http://www.brainbench.com/transcript.jsp?pid=304744
=====================================================================
If you would like to unsubscribe from this list send message to
[EMAIL PROTECTED] with "unsubscribe oops" in message body.
Archive is accessible on http://www.paco.net/oops/

Дати відповідь електронним листом