bedshanty

bedshanty / kregex

Public

A readable and structured Regular Expression DSL for Kotlin.

18
0
100% credibility
Found Feb 02, 2026 at 14 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Kotlin
AI Summary

Kregex is a Kotlin Multiplatform library that enables building regular expressions through a readable, type-safe domain-specific language with pre-built patterns for common validations.

How It Works

1
🔍 Discover Kregex

You stumble upon a handy tool that makes checking text like emails or phone numbers super simple and readable.

2
📖 Browse easy examples

You check out ready-to-use patterns for everyday needs like passwords, dates, or web links.

3
Craft your own checker

You build a custom text validator by describing it in clear, everyday steps that anyone can understand.

4
🧪 Try it on real text

You test your checker with sample inputs and watch it spot exactly what you want.

5
🔗 Add it to your work

You connect the checker into your project so it runs smoothly wherever needed.

🎉 Flawless text checks

Now your app confidently validates all user inputs, keeping everything accurate and secure.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 14 to 18 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is kregex?

kregex turns cryptic regex strings into readable Kotlin code via a structured DSL. Instead of wrestling with `^(?:[a-zA-Z0-9._%-]+)@(?:[a-zA-Z0-9-]+)\.(?:[a-zA-Z]{2,6})$`, you write `regex { line { oneOrMore { anyOf { asciiAlphanumeric(); chars("._%-") } } literal("@") ... } }`. It's Kotlin multiplatform, targeting JVM, JS, and Native for consistent regex building across apps.

Why is it gaining traction?

It delivers full regex power—anchors, lookarounds, Unicode properties, quantifiers—in self-documenting code that compiles safely, slashing maintenance headaches. Pre-built patterns for email, passwords, URLs, phones, and even Hangul make common validations instant. Multiplatform support and zero deps mean it slots into any Kotlin project without friction.

Who should use this?

Kotlin backend devs validating APIs or user input, Android devs building form checkers, or K/JS frontend folks parsing dynamic data. Ideal for teams handling international text like Korean scripts or needing named captures for structured extraction.

Verdict

Grab it for readable regular expressions if you're in Kotlin ecosystems—docs shine with examples, tests cover platforms well. At 17 stars and 1.0% credibility, it's early but stable for non-critical use; watch for adoption.

(187 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.