TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
dip s
NA
256
81.4k
How to use replace function for multiple occurrences.
Apr 17 2020 7:01 AM
Hello,
I have a string in syncfusion rich text box which is "
This
is a good
forum
"
So in rich text box it is interpreted as
MyString = <p><span style="text-decoration: underline;">This</span> is a good <span style="text-decoration: underline;">forum</span></p>
Now, i want to use replace function in angular 6.
I want to replace
<span style="text-decoration: underline;">
with
<u>
In MyString its coming 2 times but when i use replace function it replaces only 1st occurrence.
and 2nd occurrence remains as it is.
So how can i replace all occurrences.
FormattedDesc =MyString.replace(
'<span style="text-decoration: underline;">'
,
'<u>'
);
Please any help would be appreciated. Thank you.
Reply
Answers (
3
)
SVG image can be embedded In HTML5 page
How to Convert Date Format in MVC Razor Page