in reply to Re: string selection from a character class
in thread string selection from a character class
Creates the following output:#!/usr/bin/env perl use warnings; use strict; while (<DATA>) { print $2 . "\n" if /(\d)\st=(\w+)/; } __DATA__ 0 1 t=something 2 t=3foo7bar
Is this what you are trying to achieve? In any case, you should heed Limbic~Region's advice on understanding character classes (what goes into square brackets in a regex.)something 3foo7bar
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: string selection from a character class
by karden (Novice) on Jul 12, 2007 at 16:16 UTC |