|
|
ru.perl- RU.PERL ---------------------------------------------------------------------- From : Dmitry Smolin 2:5020/949 17 Jul 2001 14:36:10 To : Alexander Yakovlev Subject : ;в шаблонах -------------------------------------------------------------------------------- Once, 17 Jul 2001 13:22, Alexander Yakovlev wrote to All: AY> #!/usr/bin/perl AY> $c=chr(59); AY> while(<>){if(/\b$c/){print $_}}; AY> То есть символ ";" он его не ищет и строки подобные ";sfsdf" не AY> находит. === Cut === A word boundary (`\b') is a spot between two characters that has a `\w' on one side of it and a `\W' on the other side of it (in either order), counting the imaginary characters off the beginning and end of the string as matching a `\W'. === Cut === AY> Как это победить? Смотpя что тебе нужно. Hапpимеp так: /\s$c/ Take care. --- skanking to the rhythm of the music by my side * Origin: In restless dreams I walked alone (2:5020/949) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.perl/208523b544e11.html, оценка из 5, голосов 10
|