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


Groups > comp.lang.javascript > #31570

Re: Filter array of objects for property

From Bunny Bocarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: Filter array of objects for property
Date 2016-10-13 13:28 +0100
Organization A noiseless patient Spider
Message-ID <87pon477ra.fsf@bsb.me.uk> (permalink)
References <IKWdnYrudsxAIWPKnZ2dnUU7-XXNnZ2d@westnet.com.au> <877f9d87y0.fsf@bsb.me.uk> <1770295.oMNUckLgyt@PointedEars.de>

Show all headers | View raw


It was the best of times, it was the worst of times when someone called
Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote the following on a
fine sunny Thursday in October:

> Ben Bacarisse wrote:
<snip>
>> You can construct a RegExp from a string:
>> 
>>   RegExp(pre + '\\d+$').test(tmp)
>
> First of all, the original regular expression does _not_ match strings that 
> *start* with “trigger_”; it matches all those that *contain* “trigger_” 
> followed by a sequence of decimal digits, because the “^” anchor is
> missing.

Yes.  Have you considered switching to answering questions?  You'd be
good at it.

<snip more good stuff that I happened to know>
-- 
Ben.

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


Thread

Filter array of objects for property Andrew Poulos <ap_prog@hotmail.com> - 2016-10-13 09:44 +1100
  Re: Filter array of objects for property Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-10-13 00:27 +0100
    Re: Filter array of objects for property Andrew Poulos <ap_prog@hotmail.com> - 2016-10-13 12:57 +1100
    Re: Filter array of objects for property Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-10-13 11:21 +0100
      Re: Filter array of objects for property Bunny Bocarisse <ben.usenet@bsb.me.uk> - 2016-10-13 13:28 +0100

csiph-web