How to do this find and replace?
i have been trying figure out regex find , replace (i thought easy!), frustration getting better of me , appreciated. i'm trying 2 find , replaces:
1) in first, i'd find:
</script>
xxxx
</head>
where xxxx 4 letters (uppercase) , want store 4 letters variable ($1) use in replace
i'd replace bunch of javascript , in middle of script, i'd place variable referencing these 4 letters (<script type="text/javascript">var blah = new spry.data.xmldataset("http://$1.com"blahblah</script></head>
2) second find similar:
</html>
xxxxxxxx
where once again x 8 letters in uppercase following close of html tag (this has resulted previous find , replaces , i'm trying correct things)
i want delete these letters in case (so leave replace blank).
any appreciated! thank you
after seeing 46 views , no replies figured must easy reading doesn't want waste time such easy question (or answer found). had read adobe regex tutorial, must thick understand. ended using coda , doing regex worked find, variable didn't work in replace:
for first one, did:
</script>.(\w\w\w\w).</head>
this found wanted, when trying replace $1 inside bunch of javascript, didn't work, nor did ($1) - should add javascript did have lot of symbols (%2, %22, etc left as-is, did not mark them in way - should these "commented out" in way?). ended manually changing it, if knows did wrong please let me know.
for second one, did:
</html>.\w\w\w\w\w\w\w\w
hope helps else - thank you
More discussions in Dreamweaver support forum
adobe
Comments
Post a Comment