in reply to Regexpression is not matching
This works for me, making me wonder if there's a typo or variance between spaces and tabs, or somesuch in your problem statement or if the dot at the end of your sample data line is somehow included in your code:
That which looks like a space above, is.#!/usr/bin/perl use 5.016; # 1037230 my $string = " Code (inc. data) RO Data RW Data ZI Data + Debug Object Name\n"; # no trailing full stop/dot/period if ( $string =~m# Code \(inc\. data\) RO Data RW Data ZI +Data Debug Object Name#) { say "Good to go"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regexpression is not matching
by tobias_hofer (Friar) on Jun 05, 2013 at 14:49 UTC | |
|
Re^2: Regexpression is not matching
by gurpreetsingh13 (Scribe) on Jun 06, 2013 at 05:05 UTC |