isolating text in a string
- From: tim.bowden@xxxxxxxxxxxxxx (Tim Bowden)
- Date: Wed, 25 Jun 2008 09:20:18 +0800
Hi,
I'm trying to isolate text in a string. My string is typically of the
form:
sometext["moretext",
I would like to isolate moretext.
I tried:
#!/usr/bin/perl -w
my $string = 'sometext["moretext",';
print $string;
my $snippet;
($snippet, $snippet) = split(/$string/,\[,2);
print "$snippet\n";
I don't seem to be able to escape the [ in the split function, so two
questions:
1. How do I escape the [?
2. What would be a better way to approach this problem?
Thanks,
Tim Bowden
.
- Follow-Ups:
- Re: isolating text in a string
- From: Sisyphus
- Re: isolating text in a string
- From: John W. Krahn
- Re: isolating text in a string
- Prev by Date: Re: Sending HTML files via e-mail
- Next by Date: returning file info to C code
- Previous by thread: SELECT STATEMENT - with WHERE
- Next by thread: Re: isolating text in a string
- Index(es):
Relevant Pages
|