# Regex lookingat

**URL:** <https://discuss.kotlinlang.org/t/regex-lookingat/17523>\
**Category:** Libraries\
**Created:** [May 7, 2020, 5:06pm UTC](https://discuss.kotlinlang.org/t/regex-lookingat/17523 "2020-05-07T17:06:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhakehurst](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@dhakehurst](https://discuss.kotlinlang.org/u/dhakehurst)\
**Post date:** [May 7, 2020, 5:06pm UTC](https://discuss.kotlinlang.org/t/regex-lookingat/17523/1 "2020-05-07T17:06:52Z")

</div>

How does one do, with the kotlin regex (common stdlib) the same as the java Matcher.lookingAt method?

---

<div class="post-metadata">

**Author:** ![ilya.gorbunov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/ilya.gorbunov/32/1645_2.png) [@ilya.gorbunov](https://discuss.kotlinlang.org/u/ilya.gorbunov)\
**Post date:** [May 15, 2020, 1:01pm UTC](https://discuss.kotlinlang.org/t/regex-lookingat/17523/2 "2020-05-15T13:01:05Z")

</div>

Currently it’s impractical to provide `lookingAt` in JS backend: vanilla JS lacks such API so it would require to reimplement regex engine from scratch there. Therefore we do not have this operation in common stdlib.

Although, we could consider providing `lookingAt` in the common subset of API between Kotlin/JVM and Kotlin/Native.
