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


Groups > comp.lang.javascript > #23022

Re: Under what circumstance would the following superscript and subscript tag not rendered by a web browser?

Newsgroups comp.lang.javascript
Subject Re: Under what circumstance would the following superscript and subscript tag not rendered by a web browser?
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <f2812355-b2c4-46e3-a6a8-289ff20c0467@googlegroups.com> <XnsA2CD6C1F3F882eejj99@194.109.133.133> <e435ed7d-f63b-49d8-acc0-cbff5aafee8c@googlegroups.com>
Date 2014-02-07 14:14 +0100
Message-ID <XnsA2CD90E26AEDBeejj99@194.109.133.133> (permalink)

Show all headers | View raw


justaguy <lichunshen84@gmail.com> wrote on 07 feb 2014 in
comp.lang.javascript: 

>>> Re: Under what circumstance would the following superscript 
>>> and subscript tag not rendered by a web browser?

... be rendered ... current webbrowser?

Only under the circumstance that the stream is not of the html type.

> Let me rephrase the question.

That is not rephrasing, it is a new Q. And finally on topic.

> How do we use Regular Expression to
> change something like the following while we don't know the "X" and "Y"
> value, that is, the X could A or B etc, same goes for Y. X 

You would need your html to a string a string. 
Regex only works with/on strings.

What is the string you like to use? 
Please show an actual example.

var myString = '....';

What part of the string do you want to replace by what?

This is a tricky task, please answer extensively, 
not just replacing in the example you give, like:

var myString = 'I am just another guy';
var myString = 'I am just this guy';

See then you would not need any regex at all.

> <sup>4 </sup> 
> to X<sup>4 </sup>
> and
> Y
> <sub>2 </sub>
> to Y<sub>2 </sub>
> ?

So not some html, 
html as such can only be manipulated by regex, 
if it is first retrieved and converted to a string value.
And the converted string needs to be reinserted into the html.
The how-to may be left for later. 

Please show a character string.

... and please show what you have tried already. 

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

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


Thread

Under what circumstance would the following superscript and subscript tag not rendered by a web browser? justaguy <lichunshen84@gmail.com> - 2014-02-06 20:09 -0800
  Re: Under what circumstance would the following superscript and subscript tag not rendered by a web browser? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-07 10:37 +0100
    Re: Under what circumstance would the following superscript and subscript tag not rendered by a web browser? justaguy <lichunshen84@gmail.com> - 2014-02-07 04:20 -0800
      Re: Under what circumstance would the following superscript and subscript tag not rendered by a web browser? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-02-07 14:14 +0100
      Re: Under what circumstance would the following superscript and subscript tag not rendered by a web browser? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-02-07 15:08 +0100

csiph-web