Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30675
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: some logic error on a map function |
| Followup-To | poster |
| Date | 2016-06-17 23:10 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <2033046.3EF9NDWLXO@PointedEars.de> (permalink) |
| References | <e46e5762-3e70-475d-93e7-d4ed92e9d3e7@googlegroups.com> <njtm7u$ug4$1@dont-email.me> <1898608.dsHlmFUGLj@PointedEars.de> <707175fc-85a5-44c8-8d81-08b2329594b9@googlegroups.com> |
Followups directed to: poster
[posted & mailed]
JRough wrote:
[yet another mindbogglingly stupid full-quote following an attribution
novel]
> […] Thomas 'PointedEars' Lahn wrote:
>> [console.log() will then print “null” if there is no match in a sentence,
>> a representation of an Array of matches (with duplicates)
>> otherwise. This can be refined to give, e.g. the index of the matches in
>> a sentence, by using RegExp.prototype.exec() in a loop instead of
>> String.prototype.match().]
>
> I don't know what you mean about refining it to gie the index of the
> matches in the sentence?
> console.log(sentences.map(function (sentence) {
> // return sentence.match(rxBadWords);
> var words = sentence.split(" ");
> for (var i; i< words.length; i++){
> rxBadWords.exec(words[i]);
> }
>
> }));
> thankx, this doens't work,
RTFM!
<http://www.catb.org/esr/faqs/smart-questions.html>
F'up2 poster
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-15 20:23 -0700
Re: some logic error on a map function Jake Jarvis <pig_in_shoes@yahoo.com> - 2016-06-16 09:58 +0200
Re: some logic error on a map function "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-06-16 12:47 +0200
Re: some logic error on a map function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-16 12:55 +0200
Re: some logic error on a map function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-16 14:08 +0200
Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-16 11:04 -0700
Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-16 11:04 -0700
Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-17 13:30 -0700
Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-17 13:41 -0700
Re: some logic error on a map function Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-17 23:10 +0200
Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-06-17 13:31 -0700
Re: some logic error on a map function Scott Sauyet <scott@sauyet.com> - 2016-07-03 03:07 +0000
Re: some logic error on a map function JRough <janis.rough@gmail.com> - 2016-07-09 11:38 -0700
csiph-web