[Sharing] RegEx Cheat Sheet
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi all,
I'd like to share my RegEx Cheat Sheet as attached, that I prepared for my self-study to make myself more understood about Regex function.
One day, I realized that I frequently google about similar topic on RegEx repeatedly, so in order to save my time, I determined to prepare it for my ready reference.
But I'm just wondering this material could be helpful to somebody else, so that brought me here.
Hoping this would help you somewhat!
Please note that:
- I checked its content as much as possible, but if there might exist some mistake, please inform me.
- This is for Alteryx Designer Desktop, and not for other products.
- This cheat sheet doesn't cover comprehensive function is Alteryx Designer Desktop, but just covers the contents I feel it important and frequently used.
2023-11-08: Updated to Ver.2, added [[:punct]]
Thanks for suggestion @PhilipMannering
- Labels:
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@gawa great stuff!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Great!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here's some resources I'd like to share with you:
- https://regex101.com/ -> Helps you identify your Regex and shows you where things go wrong. Easier to troubleshoot than guesswork!
- ChatGPT -> Believe it or not, ChatGPT is great for Regex. Type in your structured sentence, and tell it with a prompt to REGEX it with Alteryx in mind. Also, give it clues as to how you want the expected result to be. I am learning way faster with ChatGPT!
- https://regexone.com/ -> Basically like W3Schools, but for Regex.
- https://www.rexegg.com/regex-quickstart.html -> I reference this from time to time to get a better grasp of REGEX. Don't try to force memorize, it doesn't work.
Some documentation from Alteryx as well:
- https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Knowledge-Base/Tool-Mastery-RegEx/ta-p/376...
- https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/RegEx-Examples-12-Handy-Use-Ca...
I've also attached a cheat sheet I keep printed out from MIT!
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Looks good to me! I always forget whether ^ and $ refer to start/end of text or start/end of lines - this clarifies it.
Appreciate it's not exhaustive, but [[:punct:]] for punctuation might be a nice addition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@PhilipMannering Thank you for your suggestion!
Addition of [[:punct:]] would be a great idea, and I've updated attachment in my original post to ver.2.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is so helpful - thanks so much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
REGEX_Replace(TRIM(REGEX_Replace([InputField], "[^0-9]+", ",")), "^,|,$", "")
