Otogi has asked for the wisdom of the Perl Monks concerning the following question:
is there any way to differentiate between the following two target strings:Line[ ]above\n (Description[ ]"(.*)"\n)? Line[ ]below\n
The problem is the lower string will return blank and the one above also will return blank if "xyz" is not there. Right now I bracket the whole line to know if the line actually exists or not but thats dumb, there must be a better way. Any thoughts? I hope I was clear please ask if you need more clarification on some point.Line above Description "xyz" Line below Line above Line below
Thank you.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex problem
by GrandFather (Saint) on Feb 27, 2006 at 22:02 UTC | |
|
Re: regex problem
by diotalevi (Canon) on Feb 27, 2006 at 22:05 UTC | |
by QM (Parson) on Feb 27, 2006 at 23:18 UTC | |
by diotalevi (Canon) on Feb 27, 2006 at 23:20 UTC | |
by QM (Parson) on Feb 27, 2006 at 23:38 UTC | |
by diotalevi (Canon) on Feb 27, 2006 at 23:40 UTC | |
|
Re: regex problem
by ambrus (Abbot) on Feb 28, 2006 at 11:53 UTC |