Adding DOTALL modifier to ECMAScript regex standards
Bob Myers
rtm at gol.com
Wed Aug 10 14:40:38 UTC 2016
If it's any consolation there is the more compact hack of `[^]`, which I
**think** is supposed to work everywhere.
On Wed, Aug 10, 2016 at 3:02 PM, Jake Reynolds <jreynoldsdev at gmail.com>
>> wrote:
>>
>>> In ECMAScript the only current way to make a match like that work is to
>>> use [\d\D] which will match everything including newlines, given below.
>>>
>>> *Current workaround regex: */he[\d\D]?llo/
>>>
>>> The *s* modifier is the standard in most major languages except
>>> Javascript and Ruby. This will allow newline matching for the . symbol.
>>> The proposed regex is below:
>>>
>>> *Proposed new regex: */he[.*]?llo/s
>>> *Example search string: *he
>>> llo
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160810/5ec6694a/attachment-0001.html>
More information about the es-discuss
mailing list