in reply to capturing optional text with a regex
This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-li +nux-thread-multi
Code:
use warnings; use strict; while (<DATA>) { print if /\s([#]\S)(.*)/; } __DATA__ 123/; #< 456/; #< a comment
Output:
123/; #< 456/; #< a comment
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: capturing optional text with a regex
by RonW (Parson) on Mar 31, 2014 at 21:05 UTC |