Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Split a string to remove quotes and parentheses

by vladb (Vicar)
on Feb 20, 2006 at 16:55 UTC ( #531461=note: print w/replies, xml ) Need Help??

in reply to Split a string to remove quotes and parentheses

You can try perl search/replace regexp:
$s = '("test123")'; $s =~ s/(\("|"\))//g; print "$s\n";
Will print:

"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce
the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true."

Robert Wilensky, University of California

Replies are listed 'Best First'.
Re^2: Split a string to remove quotes and parentheses
by perl_99_monk (Novice) on Feb 20, 2006 at 17:11 UTC
    Thank you so much... It worked

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://531461]
erix .oO( that sounds Boyer-Mooreish )
[Corion]: erix: Yes, but that's mostly for skipping characters you'll never read, but this approach skips the problem of needing to load more data while looking at a half-match
[Corion]: I mostly wonder how I can add this "reversal" to my toolchest, and if it's worth it or just clever

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (14)
As of 2016-12-06 15:32 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (108 votes). Check out past polls.