Best ways to learn RegEx?

Update: I’m gathering all answers and other resources here:

Hey all. Considering that Obsidian is adopting RegEx for its search, I was wondering what are the best sources to learn RegEx?
Now and then, I use RegEx with tools like textcrawler and grepwin. However, I never managed to get the hang of it.
What are the best ways?

4 Likes

Good question. I am interested to see what gets suggested.

1 Like

Agree - help anyone? Bueller? Bueller?

TBH the “shiny new things” announcement of search went over my head with about half the points!

1 Like

That may be so, but what it showed is that the Search feature is now a sophisticated one, one that can handle complex search queries.

I won’t use most of them, partly because i don’t need them, but partly also out of ignorance.

1 Like

Sure - I’ve been waiting for a more sophisticated search to get to the point of “Obs is the tool to commit too”. So I’m eager to understand how to use it to see if we are there yet.

1 Like

This looks great if you have an iPhone or iPad

2 Likes

A good, quick, jargon-busting guide https://www.computerhope.com/jargon/r/regex.htm

Slightly off topic, but I enjoyed, and profited from, doing this free power searching course from Google a few years ago https://coursebuilder.withgoogle.com/sample/

3 Likes

You’re lucky!


this is the best one, made by https://mobile.twitter.com/garybernhardt/
3 Likes

as a non-programmer, I found this one most helpful! Amazing Resource!

Automators podcast number 34: Getting Cozy with Regular Expressions, might be of interest https://www.relay.fm/automators/34
Also the podcast show notes include links to other resources.

1 Like

There is a great interactive tutorial on RegEx here: https://regexone.com/
I found this to be one of the more useful for learning.

If you are trying to build a more complex regex it can be helpful to use a sandbox/playground like this one: https://regexr.com/ - since it “explains” the query as well and helps to debug

2 Likes

Oh this is what I was looking for! quite amazing!

Awesome! Though I’m curious as to how a podcast can help with a “coding” problem! It should be very interesting!

So many helpful posts!

No wonder this is my favourite forum.

1 Like

agreed!

I find this website very useful: https://regex101.com/

It has a few options such as Python and PHP, so don’t forget to select “ECMAScript (JavaScript)” as that’s the one Obsidian uses.

I like this website because you can put your content below and your regex above to debug it; the right sidebar explains your regex in plain terms so you can see why there isn’t a match.

This is a great thread and I’d be sad if it’s closed as a Resolve Help post. Maybe someone can post a mega-thread with regex resources in Share & Showcase? :smiley:

7 Likes

Sure I will do it now.

done!

2 Likes

Thank you! :heart:

Wow that website is beautiful. I want to learn everything that way

1 Like