puts "Hallo " + gets.chomp + "."
?> Struppi
=> Hallo Struppi.
Du meinst so:
var string ="<a href="...">text</A>";
var neu = string.replace( /a href/, 'a target="_blank" href');
alert(neu);
Da du schon '' verwendest, sind die \" überflüssig:
`var neu = string.replace( /a href/, 'a target="_blank" href');`{:.language-javascript}
Einen schönen Donnerstag noch.
Gruß, Ashura
--
Selfcode: sh:( fo:) ch:? rl:( br:^ n4:& ie:{ mo:) va:) de:> zu:) fl:( ss:| ls:[ js:|
[30 Days to becoming an Opera8 Lover](http://operalover.tntluoma.com/8/) -- [Day 20: search.ini](http://operalover.tntluoma.com/8/day_20_searchini)
Meine Browser: Opera 8.01 | Firefox 1.0.4 | Lynx 2.8.3 | Netscape 4.7 | IE 6.0
[\[Deshalb frei! - Argumente pro freie Software\]](http://deshalbfrei.org/)