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


Groups > comp.lang.javascript > #38739

Re: Find part match in array

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Find part match in array
Date 2020-08-18 21:59 +0200
Organization PointedEars Software (PES)
Message-ID <5407140.DvuYhMxLoT@PointedEars.de> (permalink)
References <9rCdnYySpppZSKTCnZ2dnUU7-N3NnZ2d@westnet.com.au> <1927146.oMNUckLgyt@PointedEars.de> <qumdnS2Bv-bgkabCnZ2dnUU7-fvNnZ2d@westnet.com.au>

Show all headers | View raw


Andrew Poulos wrote:

> On 18/08/2020 3:36 am, Thomas 'PointedEars' Lahn wrote:
>>    1. You do not have to use regular expressions.  Especially in
>>    ECMAScript
>>       Ed. 6 and newer, there are methods like String.prototype.includes()
>>       which with you can search for substrings easily.
> 
> Using String.prototype.includes is always case sensitive so if I need a
> case insensitive test I'm going to need to convert the strings to, say,
> lower case.

Yes, and that can be a problem if you have letters beyond the BMP.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

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


Thread

Find part match in array Andrew Poulos <ap_prog@hotmail.com> - 2020-08-17 10:56 +1000
  Re: Find part match in array Andrew Poulos <ap_prog@hotmail.com> - 2020-08-17 13:06 +1000
  Re: Find part match in array "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2020-08-16 20:54 -0700
  Re: Find part match in array JJ <jj4public@vfemail.net> - 2020-08-17 16:36 +0700
  Re: Find part match in array Julio Di Egidio <julio@diegidio.name> - 2020-08-17 05:01 -0700
  Re: Find part match in array Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-08-17 19:36 +0200
    Re: Find part match in array Andrew Poulos <ap_prog@hotmail.com> - 2020-08-18 09:02 +1000
      Re: Find part match in array Andrew Poulos <ap_prog@hotmail.com> - 2020-08-18 13:09 +1000
      Re: Find part match in array "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-08-18 11:28 +0200
        Re: Find part match in array "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-08-18 12:59 +0200
      Re: Find part match in array Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2020-08-18 21:59 +0200

csiph-web