N. Ganesh Babu wrote:
Hi John,
Hello,
I am new to understanding and how to use modules in perl programs. I
have downloaded and installed the Modules you specified. The
documentation in that I can not able to understand. Can you please help
with a sample code.
I'm sorry, I haven't used that modul
Hi John,
I am new to understanding and how to use modules in perl programs. I
have downloaded and installed the Modules you specified. The
documentation in that I can not able to understand. Can you please help
with a sample code.
Thanks in advance.
Regards,
Ganesh
John W. Krahn wrote:
N. Ganes
N. Ganesh Babu wrote:
Thank you very much for you help. One more small help.
fourth string
B. van Sures to be tagged as B.van Sures
fifth string
van Sures, B., to be tagged as van
SuresB.
sixth string
Bockris, O. M. J., to be tagged as
BockrisO.
M.J.
All 6 should be converted in a single rege
Dear John,
Thank you very much for you help. One more small help.
fourth string
B. van Sures to be tagged as B.van Sures
fifth string
van Sures, B., to be tagged as van SuresB.
sixth string
Bockris, O. M. J., to be tagged as
BockrisO.
M.J.
All 6 should be converted in a single regex.
Regards,
G
N. Ganesh Babu wrote:
Dear All,
Hello,
I have to convert these lines into individual part of name information
with a single regular expression.
Input:
B. E. Conway,
J. O. M. Bockris
B. Conway
Output:
B.E.Conway
J.O. M.
Bockris
B. Conway
Can anybody help me in getting the single regular expressi
Dear All,
I have to convert these lines into individual part of name information
with a single regular expression.
Input:
B. E. Conway,
J. O. M. Bockris
B. Conway
Output:
B.E.Conway
J.O. M.
Bockris
B. Conway
Can anybody help me in getting the single regular expression.
Thanks for the help.
Rega
On May 3, 2004, at 4:58 AM, Traeder, Philipp wrote:
You're right - I didn't read the original question closely enough.
For the record:
If you want to strip trailing newlines, use chomp.
If you want to strip newlines anywhere else, use regexes.
Or
tr/\n//d;
James
--
To unsubscribe, e-mail: [EMA
On Mon, 2004-05-03 at 10:58, Traeder, Philipp wrote:
> For the record:
> If you want to strip trailing newlines, use chomp.
> If you want to strip newlines anywhere else, use regexes.
And, if you want to strip trailing characters (no matter what they are;
let's say you know there's always a traili
On Mon, 2004-05-03 at 11:02, Owen wrote:
> What happens if you try s/\\n/HI/
> (untested)
That would replace a backslash followed by the 'n' character with "HI".
>From the original message:
$_="Hi. \n This is test string";
So there is no backslash followed by an 'n' in $_ (actually, there isn'
On Mon, 3 May 2004 15:00:20 +0530
"Durai" <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I am having the following lines of code to remove "\n" from string.
>
> $_="Hi. \n This is test string";
> s/
> (\n)
> /HI
> /xisg;
>
> print;
>
> I expected the output like:
>
> Hi. HI This is test string
> On Mon, 2004-05-03 at 10:46, Traeder, Philipp wrote:
> > chomp might be the easiest (and probably fastest) solution.
>
> True :-) But the '\n' he was looking for was in the middle of the
> sentence :-)
>
> BTW, I kept the trailing 'g' in the substitution just because I didn't
> knew what the in
On Mon, 2004-05-03 at 10:46, Traeder, Philipp wrote:
> chomp might be the easiest (and probably fastest) solution.
True :-) But the '\n' he was looking for was in the middle of the
sentence :-)
BTW, I kept the trailing 'g' in the substitution just because I didn't
knew what the input text might b
> The problem is that the second part of the substitution (HI) is not
> taken as a regex, but as a string, which is to mean that you're trying
> to replace "\n" with "HI\n".
>
> If you were using
>
> s/
> (\n)
> /HI/xisg;
>
> instead, you wouldn't have that problem.
>
>
> Now that we've been
Durai wrote:
>
> Hello All,
Hello,
> I am having the following lines of code to remove "\n" from string.
>
> $_="Hi. \n This is test string";
> s/
> (\n)
> /HI
> /xisg;
>
> print;
>
> I expected the output like:
>
> Hi. HI This is test string
>
> But I got:
>
> Hi. HI
> This is test str
Hi.
The problem is that the second part of the substitution (HI) is not
taken as a regex, but as a string, which is to mean that you're trying
to replace "\n" with "HI\n".
If you were using
s/
(\n)
/HI/xisg;
instead, you wouldn't have that problem.
Now that we've been through the problem, le
Hello All,
I am having the following lines of code to remove "\n" from string.
$_="Hi. \n This is test string";
s/
(\n)
/HI
/xisg;
print;
I expected the output like:
Hi. HI This is test string
But I got:
Hi. HI
This is test string
Anything wrong?
Regs,
Durai.
---
Outgoing mail is c
16 matches
Mail list logo