in reply to Re^2: Regex problem
in thread Regex problem
Here is the output:#!/usr/bin/env perl use warnings; use strict; my $value = '"sample1\*sample2\*sample3*sample4*sample5"'; print 'original string: ', $value, "\n"; $value =~ s#\\\*#STAR#g; $value =~ s/\"//g; # now remove double quotes print 'output string: ', $value, "\n";
I am assuming your original string already has double quotes in it.original string: "sample1\*sample2\*sample3*sample4*sample5" output string: sample1STARsample2STARsample3*sample4*sample5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Regex problem
by johngg (Canon) on Aug 02, 2007 at 22:30 UTC |