Hi,
I need to modify some existing code. The below line checks a file I'm reading
in and does a search/replace based on the match. Currently I'm looking for...
if (/0 set/) { ...etc.
Because the 00 can change to different numbers (but always 6 figures
which could include a period)
FlashMX wrote:
Hi,
I need to modify some existing code. The below line checks a file I'm reading
in and does a search/replace based on the match. Currently I'm looking for...
if (/0 set/) { ...etc.
Because the 00 can change to different numbers (but always 6 figures
which could include a
Cool...that worked...thanks
I forgot to mention that one the match is found I do a search and replace
if (/[0-9.]{6} setgray/) {
s/.9 set/-50.2 v \n.9 set/;
This is the issue. I need to grab the match number (whatever it is) and add
it into the s/
Because it's up-side down.
Why is that?
It makes replies harder to read.
Why not?
Please don't top-post.
(Sherm Pendley, MacOSX List)
FlashMX wrote:
Cool...that worked...thanks
I forgot to mention that one the match is found I do a search and replace
if (/[0-9.]{6} setgray/) {
FlashMX wrote:
Hi,
Hello,
I need to modify some existing code. The below line checks a file I'm
reading in and does a search/replace based on the match. Currently
I'm looking for...
if (/0 set/) { ...etc.
Because the 00 can change to different numbers (but always 6
figures which could
John W. Krahn wrote:
FlashMX wrote:
I need to modify some existing code. The below line checks a file I'm
reading in and does a search/replace based on the match. Currently
I'm looking for...
if (/0 set/) { ...etc.
Because the 00 can change to different numbers (but always 6
figures which
FlashMX wrote:
Cool...that worked...thanks
I forgot to mention that one the match is found I do a search and replace
if (/[0-9.]{6} setgray/) {
s/.9 set/-50.2 v \n.9 set/;
This is the issue. I need to grab the match number (whatever it is) and
On Fri, 11 Mar 2005 07:53:30 -0800, John W. Krahn wrote:
John W. Krahn wrote:
FlashMX wrote:
I need to modify some existing code. The below line checks a file I'm
reading in and does a search/replace based on the match. Currently
I'm looking for...
if (/0 set/) { ...etc.
Because the
FlashMX wrote:
Cool...that worked...thanks
I forgot to mention that one the match is found I do a search and replace
if (/[0-9.]{6} setgray/) {
s/.9 set/-50.2 v \n.9 set/;
This is the issue. I need to grab the match number (whatever it is) and add
it into
On Fri, 11 Mar 2005 10:57:19 -0500, FlashMX wrote:
On Fri, 11 Mar 2005 07:53:30 -0800, John W. Krahn wrote:
John W. Krahn wrote:
FlashMX wrote:
I need to modify some existing code. The below line checks a file I'm
reading in and does a search/replace based on the match. Currently
I'm
Why does this syntax not work? The $1 does not come out.
if (/([0-9.]{6}) set/) {
s/$1 set/\n-50.2 v \n$1 set/;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
if (/([0-9.]{6}) set/) {
s/$1 set/\n-50.2 v \n$1 set/;
You need to escape the period or it will match any character but
newline. As it is right now you'll match .FANTA, which isn't what
you want.
Why does this syntax not work? The $1 does not come out.
You
Stone wrote:
if (/([0-9.]{6}) set/) {
s/$1 set/\n-50.2 v \n$1 set/;
You need to escape the period or it will match any character but
newline. As it is right now you'll match .FANTA, which isn't what
you want.
A character class is not the same as a regular
Hi Everyone,
This is my first post to the list Please be gentle :)
Just so we are all clear... I am completely lost right from the start
with this one. It is far beyond my current Perl skills and I need some
serious help :)
I want to create a script that searches file_b for the first entry
Chris Richards wrote:
This is my first post to the list Please be gentle :)
Sure.
Just so we are all clear... I am completely lost right from the
start with this one. It is far beyond my current Perl skills
Oh?
and I need some serious help :)
Then, this is the most serious (and gentle) help I
Fair enough.
-Chris
-Original Message-
From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED]
Sent: Monday, 2 August 2004 10:08 PM
To: [EMAIL PROTECTED]
Subject: Re: Searching and replacing text
Chris Richards wrote:
This is my first post to the list Please be gentle :)
Sure.
Just
Could you post the code you have written thus far? It would be a great help.
-ZO
Chris Richards [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi Everyone,
This is my first post to the list Please be gentle :)
Just so we are all clear... I am completely lost right from the start
17 matches
Mail list logo