Sunday, 15 August 2010

Regex for jQuery -


I have to change all the errors in red within the 'p' element. In fact if there is an error, it will start from a space (not always) & amp; 3 or more asterisks (always)

For example:

  *** Error [14567] Failed to initiate manager ***** error [14567] Manager failed to initialize  

My code:

  & lt; Script & gt; $ ('P') each (function () {$ this.html ($ ($ this.text) Replace. (/ (\ S) * [*] * (\ s) * Error. * / Ig, '& Lt; Span style = "color: red;" gt; $ & amp; & lt; / span & gt; '));   

But this Please do help. / P>

You line is required to define but

 
  & lt; script src =" https://ajax.googleapis.com/ Ajax / Libs / Vector / 1.11.1 / jquery.men.jes "> gt; & lt; / script & gt; ; & Lt; p & gt; *** Error [14567] Administrator failed to start. & Lt; / p & gt; & lt; P & gt; The first line ***** error [14567] failed to initialize the manager. The other line & lt; / P & gt;  


No comments:

Post a Comment