Hello I've been trying a bunch of things to try and get this to work.
What I"m trying to do is take a sring like this:


select * from "sch "."test"
and change it to something like this
select * from "hello"."test"

I've tried a few things like

$LINE=~/["].+["]/\"hello\";
$LINE=~/".+"/\"hello\";
$LINE=~/\".+\"/\"hello\";

That's just a few examples of what I have tried.
Any suggestions?

Finally found a good solution

$LINE=~s/["](.*?)["]/\"hello\"/;

Not sure exactly what the syntax in the
() means exactly
. means at least 1 character but I haven't used * and ? before so if anyone wants to enlighten me that would be much appreciated.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.