# Is regex an art form?

**URL:** https://forum.kirupa.com/t/is-regex-an-art-form/647094
**Category:** web dev
**Created:** [April 8, 2021, 1:36am UTC](https://forum.kirupa.com/t/is-regex-an-art-form/647094 "2021-04-08T01:36:06Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![JohnHansenArtist](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/johnhansenartist/32/8958_2.png) [@JohnHansenArtist](https://forum.kirupa.com/u/JohnHansenArtist)
#### Post date: [April 8, 2021, 1:36am UTC](https://forum.kirupa.com/t/is-regex-an-art-form/647094/1 "2021-04-08T01:36:06Z")

</div>

I find when I need to resort to, or maybe it’s a good choice, that when using regex it helps solve some coding needs in a JavaScript function. I use online regex testing like regex101, and also I will sometimes look for answers on the web. I come up with solutions that seem to work very well but I can’t help but thinking that there’s more than one or multiple regex solutions attainable in order to match or create groups. I just would like to know if my feelings about this ‘more than one way to skin a cat’ solution is the proper way to think about this or am I just ‘barking up the wrong tree’? 😉

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [April 8, 2021, 3:27am UTC](https://forum.kirupa.com/t/is-regex-an-art-form/647094/2 "2021-04-08T03:27:18Z")

</div>

Regex is a complete mystery for me. I know the basics and with enough trial and error I can generate the pattern I need, but it’s a lot of guesswork. For things like regex, I always wanted a way to just ask my Alexa or Google Home device to help me out.

---

<div class="post-metadata">

### Author: ![JohnHansenArtist](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/johnhansenartist/32/8958_2.png) [@JohnHansenArtist](https://forum.kirupa.com/u/JohnHansenArtist)
#### Post date: [April 8, 2021, 10:38am UTC](https://forum.kirupa.com/t/is-regex-an-art-form/647094/3 "2021-04-08T10:38:06Z")

</div>

LOL I may have to buy one of those units now! 😉

---

<div class="post-metadata">

### Author: ![tbo](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tbo](https://forum.kirupa.com/u/tbo)
#### Post date: [April 8, 2021, 11:59am UTC](https://forum.kirupa.com/t/is-regex-an-art-form/647094/4 "2021-04-08T11:59:30Z")

</div>

> [@kirupa](#):
>
> Regex is a complete mystery for me. I know the basics and with enough trial and error I can generate the pattern I need, but it’s a lot of guesswork. For things like regex, I always wanted a way to just ask my Alexa or Google Home device to help me out.

Same here, i recall back in my as3 days every so often it i had a question here on kirupa forums, someone would post a magical regex that fixed it. Its probably one of the only confirmed solution to a problem i never stopped to at least partially understand.

---

<div class="post-metadata">

### Author: ![TheCanadian](https://avatars.discourse-cdn.com/v4/letter/t/67e7ee/32.png) [@TheCanadian](https://forum.kirupa.com/u/TheCanadian)
#### Post date: [April 8, 2021, 7:46pm UTC](https://forum.kirupa.com/t/is-regex-an-art-form/647094/5 "2021-04-08T19:46:56Z")

</div>

I recall really trying to learn regex in AS3. It was often frustrating but also a lot of fun.

---

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [April 8, 2021, 9:40pm UTC](https://forum.kirupa.com/t/is-regex-an-art-form/647094/6 "2021-04-08T21:40:52Z")

</div>

This thread is really inspiring me to go back and really learn regex now! 📖

---

<div class="post-metadata">

### Author: ![JohnHansenArtist](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/johnhansenartist/32/8958_2.png) [@JohnHansenArtist](https://forum.kirupa.com/u/JohnHansenArtist)
#### Post date: [April 9, 2021, 12:16am UTC](https://forum.kirupa.com/t/is-regex-an-art-form/647094/7 "2021-04-09T00:16:14Z")

</div>

I’ve been lately using regex in react components where I’m bringing in external data, and metadata where I may need to separate some things out, especially HTML elements, images, etc. Always fun when an npm package gets an update which may all of a sudden break one’s regex. You should see my regex for verifying a person’s name in a form… 😵 lol

---

<div class="post-metadata">

### Author: ![steve.mills](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/steve.mills/32/14961_2.png) [@steve.mills](https://forum.kirupa.com/u/steve.mills)
#### Post date: [April 9, 2021, 8:27am UTC](https://forum.kirupa.com/t/is-regex-an-art-form/647094/8 "2021-04-09T08:27:39Z")

</div>

Funny I just bought a book about a week ago on regex…
