Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #16358

Re: str.replace() not catching, need a second set of eyes

Newsgroups comp.lang.javascript
Date 2012-10-03 13:36 -0700
References <8815d054-214a-4c1d-b8d4-19c0916589e3@googlegroups.com> <XnsA0E1AB80D3AD7eejj99@194.109.133.133> <5341950e-842e-4c73-85a8-02fed57f7d7d@googlegroups.com>
Message-ID <a6471a40-57d2-4268-89f6-ab878db551dc@googlegroups.com> (permalink)
Subject Re: str.replace() not catching, need a second set of eyes
From Danny <dann90038@gmail.com>

Show all headers | View raw


I see nothing wrong with your regex, I test it in a mock page using js as well as in Kodos(python regex app) and it shows that it's actually nongreedy, well I guess I didn't test in IE7, I don't have it at any rate just 9, however, it shows that when you have 1 nested or more <span> will pick up the outter one only, which leads me to think is just some malformed markup being pasted, since it's just string anyway before any parsing.  I can't say is just an old browser regex engine, but I'd just do some logging on when it happens, log the inputs, save 'var a' before any .replace() takes place.  As far as which browser is parsing, you can get it from js with navigator.userAgent.

You can just do some quick logging for a small period of time, like say 5hrs or so, to be able to check which inputs are doing it.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

str.replace() not catching, need a second set of eyes Jason C <jwcarlton@gmail.com> - 2012-10-03 02:25 -0700
  Re: str.replace() not catching, need a second set of eyes "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-03 14:51 +0000
    Re: str.replace() not catching, need a second set of eyes Jason C <jwcarlton@gmail.com> - 2012-10-03 12:36 -0700
      Re: str.replace() not catching, need a second set of eyes Danny <dann90038@gmail.com> - 2012-10-03 13:36 -0700
      Re: str.replace() not catching, need a second set of eyes "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-10-04 07:47 +0000
        Re: str.replace() not catching, need a second set of eyes Jason C <jwcarlton@gmail.com> - 2012-10-05 01:42 -0700
          Re: str.replace() not catching, need a second set of eyes Dr J R Stockton <reply1240@merlyn.demon.co.uk.invalid> - 2012-10-06 19:10 +0100

csiph-web