in reply to regex for a phrase beginning with some chars
use strict; use warnings; while (<DATA>) { print if /^ascii\b/i; } __DATA__ does not begin with ascii ascii is the one AsCii works too asciibetically sorted
Prints:
ascii is the one AsCii works too
Updated: Added "asciibetically" line to demonstrate \b (johngg++)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex for a phrase beginning with some chars
by johngg (Canon) on Feb 18, 2009 at 22:12 UTC |