I don't use Jquery.
Code:
<script type="text/javascript">
// http://www.w3schools.com/jsref/jsref_obj_string.asp
// http://www.w3schools.com/jsref/jsref_obj_regexp.asp
var str = '<img src="" alt=""> text text text';
var re=/<[^>]+>/;
alert(re.test(str)); // true
alert(str.match(re)); // <img src="" alt="">
var s = ' metin metin metin';
var yeni = str.match(re) + s;
alert(yeni); // <img src="" alt=""> metin metin metin
// or
alert(str.indexOf('>') ); //18
var t = str.slice(str.indexOf('>') +1 );
alert(t); // text text text
var T = ' Burada şimdi başka bir yazı var.';
yeni2 = str.replace(str.slice(str.indexOf('>') +1 ), T);
alert(yeni2); // <img src="" alt=""> Burada şimdi başka bir yazı var.
</script>
The Time Through Ages
In the Name of Allah, Most Gracious, Most Merciful
1. By the Time,
2. Verily Man is in loss,
3. Except such as have Faith, and do righteous deeds, and (join together) in the mutual enjoining of Truth, and of Patience and Constancy.
Bookmarks