Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
31
rated 0 times [  36] [ 5]  / answers: 1 / hits: 33160  / 11 Years ago, tue, august 27, 2013, 12:00:00

I need to remove the span tag from string .Is it posible .?



My input is this



In open <span class=>court</span> at 11:01 a.m.)
THE <span class=>COURT</span>: Our interpreter.
(NOTE: Spanish interpreter Rosa Lopez-Gaston sworn.)
SPEAKER 2: Judy Faviell for the State.
SPEAKER 1: Carey Bhalla for Mr. Garcia, who is present in custody, Your Honor.
SPEAKER 2: Judge, we do have a change of plea, which I will tender to the <span class=>Court</span>.
THE <span class=>COURT</span>:


Output is this



 In open court at 11:01 a.m.)
THE COURT: Our interpreter.
(NOTE: Spanish interpreter Rosa Lopez-Gaston sworn.)
SPEAKER 2: Judy Faviell for the State.
SPEAKER 1: Carey Bhalla for Mr. Garcia, who is present in custody, Your Honor.
SPEAKER 2: Judge, we do have a change of plea, which I will tender to the <span class=>Court</span>.
THE COURT:

More From » jquery

 Answers
8

For your edited question you can do this:



var str = // your string here

str = str.replace(/</?span[^>]*>/g,);


Demo: http://jsfiddle.net/vXXJ6/


[#76100] Monday, August 26, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arthur

Total Points: 729
Total Questions: 107
Total Answers: 109

Location: China
Member since Mon, Aug 22, 2022
2 Years ago
;