substrate has asked for the wisdom of the Perl Monks concerning the following question:
I want to do an operation on everything between the .subckt line up to, but not including the x00 line. so I write something like this:.subckt cct0 v0 v1 v2 v3 + v4 v5 v6 * useless comment + v7 v8 v9 + va vb x00 v0 v1 x0 cct1 .ends
This almost works, but it prints out the x00 line. I know that a word transition is what I want to switch on, but I don't know how to capture everything up to, but not including the word transition. On the word transistions I'll need to do another operation.while(<>) { if(/^\.subckt/../^\w/) { print; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regexp match up to but not incliuding...
by davido (Cardinal) on Dec 18, 2003 at 16:53 UTC | |
|
Re: regexp match up to but not incliuding...
by ysth (Canon) on Dec 18, 2003 at 16:56 UTC | |
|
Re: regexp match up to but not incliuding...
by gjb (Vicar) on Dec 18, 2003 at 16:19 UTC | |
|
Re: regexp match up to but not incliuding...
by injunjoel (Priest) on Dec 18, 2003 at 18:20 UTC |