Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #40185
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Verbose Regular Expressions |
| Date | 2021-06-08 19:31 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <1803103.tdWV9SEqCh@PointedEars.de> (permalink) |
| References | <slrnsao33e.1q1s.jon+usenet@raven.unequivocal.eu> |
Jon Ribbens wrote:
> I've just published an npm package:
> https://www.npmjs.com/package/verbose-regexp
>
> It provides a way to use verbose regular expressions in JavaScript and
> TypeScript, similar to re.VERBOSE in Python. It provides that white-space
> at the start and end of lines are ignored, as are newlines, and anything
> following // to the end of the line.
>
> It allows you to easily write multi-line regular expressions, and to make
> your regular expressions more self-documenting using formatting and
> comments.
> […]
> Any comments or thoughts would be appreciated.
I have had support for some PCRE features, including this one, in
JSX:regexp.js:jsx.regexp.RegExp for some time [1], but to support
it by an actual syntax extension via Node.js is a nice idea. (I did
not even know that that was possible.)
[1] <https://github.com/PointedEars/JSX/blob/master/regexp.js>
(Needs fixing now that the new properties of RegExp instances are
read-only. TODO for the summer break.)
--
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 | Next in thread | Find similar | Unroll thread
Verbose Regular Expressions Jon Ribbens <jon+usenet@unequivocal.eu> - 2021-05-24 20:28 +0000
Re: Verbose Regular Expressions Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-06-08 19:31 +0200
Re: Verbose Regular Expressions Scott Sauyet <scott@sauyet.com> - 2021-06-18 05:46 -0700
Re: Verbose Regular Expressions Jon Ribbens <jon+usenet@unequivocal.eu> - 2021-06-18 15:19 +0000
Re: Verbose Regular Expressions Scott Sauyet <scott.sauyet@gmail.com> - 2021-06-19 20:25 -0700
Re: Verbose Regular Expressions Jon Ribbens <jon+usenet@unequivocal.eu> - 2021-06-20 11:21 +0000
Re: Verbose Regular Expressions Scott Sauyet <scott.sauyet@gmail.com> - 2021-06-27 16:37 -0700
csiph-web