, , , (?) . , s, , '<'. [^<]* , : s[0] s[n-1] (s c- , ). ( '<'). [^<]* s[0] s[n-2], '<' . , 0 0 ( * , ). , , 0 , , s[1], . 2 .., . .
Edit:
Your regular expression will essentially match any part of the line that ends with <?and does not contain the other <, for example, in <<?it matches <?and in ba<abc<?def, it matches abc<?. Some of the proposed suggestions will behave differently. In particular, ^[^<]*<\?it will not match either of these two examples.
source
share