Ask a Question related to Macromedia Dreamweaver, Design and Development.
-
DareDevil #1
Search and Replace Question
Hi,
Is it possible to (and if yes how) to find all instance of
a string similar to this:
height=34
and have dreamweaver replace it with
height="34"
I know about the RegExp in search and replace and have already
tried using a search on height=\d* to find all the matching strings,
but I can't figure out how to automatically add the quotes...(height="\d*"
didn't work)
Thanks for your help!
Laurent
DareDevil Guest
-
Search and replace
I'm certain this has been asked 1000 times.. however ... I recently imported some data - all INTs ... from an excel sheet, but the damn thing... -
Search and replace weirdness
I have just completed an office layout plan for a new building. The plan shows some 200 offices and each office has a number containing several zeros... -
Search and replace (super global replace)
I am using the 30 day trail of acrobate professional....before I buy it I have a few questions.... 1) is there a "search and replace" function... -
search an replace
Hi This scripts sucks in a 109mb file and i'm trying to do a search and replace on unxtime to the format from strftime. Which is working... ... -
search replace
Hi , How do I search replace text in a file from a perl script. i.e. by opening the file in write mode and then do a search replace. I don't... -
Ville Leivo #2
Re: Search and Replace Question
hi,
yes, it's possible. go to Edit > Find And Replace. Or press CTRL+F and it
should open a dialog for you..
-ville
DareDevil wrote:> Hi,
>
> Is it possible to (and if yes how) to find all instance of
> a string similar to this:
>
> height=34
>
> and have dreamweaver replace it with
>
> height="34"
>
> I know about the RegExp in search and replace and have already
> tried using a search on height=\d* to find all the matching strings,
> but I can't figure out how to automatically add the quotes...(height="\d*"
> didn't work)
>
> Thanks for your help!
>
> Laurent
>
>Ville Leivo Guest
-
DareDevil #3
Re: Search and Replace Question
Yes I know that...
I'd like to find a way to have dreamweaver replace all height=<any number>
by
height="<any number>"
I used height=34 only as an example...
Thanks
"Ville Leivo" <ville.leivo@kolumbus.fi> wrote in message
news:3F1CD6B5.2080301@kolumbus.fi...quotes...(height="\d*"> hi,
>
> yes, it's possible. go to Edit > Find And Replace. Or press CTRL+F and it
> should open a dialog for you..
>
> -ville
>
> DareDevil wrote:> > Hi,
> >
> > Is it possible to (and if yes how) to find all instance of
> > a string similar to this:
> >
> > height=34
> >
> > and have dreamweaver replace it with
> >
> > height="34"
> >
> > I know about the RegExp in search and replace and have already
> > tried using a search on height=\d* to find all the matching strings,
> > but I can't figure out how to automatically add the>> > didn't work)
> >
> > Thanks for your help!
> >
> > Laurent
> >
> >
DareDevil Guest
-
Ville Leivo #4
Re: Search and Replace Question
what about pressing "replace all"?
Search for "Source code": height=34
Replace with: height="34"
and then press "R
eplace all".
-ville
DareDevil wrote:> Yes I know that...
> I'd like to find a way to have dreamweaver replace all height=<any number>
> by
> height="<any number>"
>
> I used height=34 only as an example...
>
> Thanks
>
>
> "Ville Leivo" <ville.leivo@kolumbus.fi> wrote in message
> news:3F1CD6B5.2080301@kolumbus.fi...
>> quotes...(height="\d*">>hi,
>>
>>yes, it's possible. go to Edit > Find And Replace. Or press CTRL+F and it
>>should open a dialog for you..
>>
>>-ville
>>
>>DareDevil wrote:
>>>>>>>Hi,
>>>
>>>Is it possible to (and if yes how) to find all instance of
>>>a string similar to this:
>>>
>>>height=34
>>>
>>>and have dreamweaver replace it with
>>>
>>>height="34"
>>>
>>>I know about the RegExp in search and replace and have already
>>>tried using a search on height=\d* to find all the matching strings,
>>>but I can't figure out how to automatically add the
>>>>>>>didn't work)
>>>
>>>Thanks for your help!
>>>
>>>Laurent
>>>
>>>
>Ville Leivo Guest
-
Alan Ames #5
Re: Search and Replace Question
try this on a page- but backup first, it's late here
Find in Source: Specific Tag-->IMG
With: Attribute-->Width= (\d*)
Action: Set Attribute Width= "$1"
Put checkmark in "use RegExp"
--
Team Macromedia Volunteer for Dreamweaver
Certified Dreamweaver MX Developer
Alan Ames Guest
-
Saju Palayur #6
Search and Replace question
Hi
I am trying to do some thing like this, but am getting the wrong output. Can
somebody tell if my regular expression is wrong or not?
---------Perl script---------------------------------------
$line = "ABCXYZGwcTI\\ABCXYZIntValTI";
$line=~s/ABCXYZ(.*)TI/Hello$1/g;
print $line;
---------Output---------------------------------------
HelloGwcTI\\ABCXYZIntVal
---------Expected Output-------------------------
HelloGwc\\HelloIntVal
----------------------------------------------------------
Thanks in Adcance
Saju
__________________________________________________ _______________
Tired of slow downloads and busy signals? Get a high-speed Internet
connection! Comparison-shop your local high-speed providers here.
[url]https://broadband.msn.com[/url]
Saju Palayur Guest
-
David #7
Re: Search and Replace question
Saju Palayur wrote:
that's not the output of the above script. you shouldn't see '\\', there> Hi
>
> I am trying to do some thing like this, but am getting the wrong output.
> Can somebody tell if my regular expression is wrong or not?
>
> ---------Perl script---------------------------------------
> $line = "ABCXYZGwcTI\\ABCXYZIntValTI";
>
> $line=~s/ABCXYZ(.*)TI/Hello$1/g;
> print $line;
> ---------Output---------------------------------------
> HelloGwcTI\\ABCXYZIntVal
should be just one. the other one is long gone from the double quote. next
time you post, you should be more careful to provide the correct output of
your script as to avoid confusion.
again, i assume you mean: "HelloGwc\HelloIntVal"> ---------Expected Output-------------------------
> HelloGwc\\HelloIntVal
> ----------------------------------------------------------
the reason is because (.*) is greedy and matching from the first 'G' up to
the last 'l'. you need to stop the greedy-ness (.*) like:
#!/usr/bin/perl -w
use strict;
my $line1 = "ABCXYZGwcTI\\ABCXYZIntValTI";
my $line2 = $line1;
#--
#-- for your purpose, you can use either one of followings
#--
$line1 =~ s/ABCXYZ(.+?)TI/Hello$1/g;
$line2 =~ s/ABCXYZ(.*?)TI/Hello$1/g;
print $line1,"\n";
print $line2,"\n";
__END__
prints:
HelloGwc\HelloIntVal
HelloGwc\HelloIntVal
david
--
s,.*,<<,e,y,\n,,d,y,.s,10,,s
..ss.s.s...s.s....ss.....s.ss
s.sssss.sssss...s...s..s....
....s.ss..s.sss..ss.s....ss.s
s.sssss.s.ssss..ss.s....ss.s
...s..sss.sssss.ss.sss..ssss.
...sss....s.s....ss.s....ss.s
,....{4},"|?{*=}_'y!'+0!$&;"
,ge,y,!#:$_(-*[./<-@{-},b-t,
..y...,$~=q~=?,;^_#+?{~,,$~=~
y.!-&*-/:-@^_{}.a-t ().;s,;,
);,g,s,s,$~s,g,y,y,%,,g,eval
David Guest



Reply With Quote

