Partial matching a string against a regex

Sassan Haradji sassanh at gmail.com
Tue Mar 7 03:13:16 UTC 2017


This is the issue I created for XRegExp to support it:
https://github.com/slevithan/xregexp/issues/165#issuecomment-284593620 <https://github.com/slevithan/xregexp/issues/165#issuecomment-284593620>
and this is an old issue about it again:
https://github.com/slevithan/xregexp/issues/52 <https://github.com/slevithan/xregexp/issues/52>

They say it’s hard to implement it without accessing the internal regex mechanism.

Btw, in the stackoverflow thread I created and referenced in first email someone came with a good temporary solution that works for me. I hope we’ll have the complete version in future versions of js.

Cheers,
Sassan

> On Esfand 14, 1395 AP, at 22:50, Michael J. Ryan <tracker1 at gmail.com> wrote:
> 
> I actually like the idea... You can do an optional matching block for parents (...)? But that would be patterns for each character...  Having a String.startsWith that can do a match against the start of a rexexp would be cool.  and/or regex.testStart
> 
> 
> 
> -- 
> Michael J. Ryan - tracker1 at gmail.com <mailto:tracker1 at gmail.com> - http://tracker1.info <http://tracker1.info/>
> 
> Please excuse grammar errors and typos, as this message was sent from my phone.
> 
> On Mar 4, 2017 6:36 AM, "Kent C. Dodds" <kent at doddsfamily.us <mailto:kent at doddsfamily.us>> wrote:
> I can't say that I know what the repercussions of such a feature would be, but I'll just add that I've definitely had this use case before and feel like it would be really useful to have in the language. 👍 
> -- 
> - Kent C. Dodds <https://twitter.com/kentcdodds>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org <mailto:es-discuss at mozilla.org>
> https://mail.mozilla.org/listinfo/es-discuss <https://mail.mozilla.org/listinfo/es-discuss>
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170307/ea2f59d4/attachment.html>


More information about the es-discuss mailing list