matke
matke

I haven’t used Drafts for ages. The new custom syntaxes looks very interesting. Maybe I need to take another look.

|
Embed
Progress spinner
odd
odd

@matke My brain hurts when I see regex. Maybe I ought to learn more about it, so that I can unhurt. 🤔

|
Embed
Progress spinner
Miraz
Miraz

@odd Regex is a wonderful thing and well worth spending a bit of time learning at least some basics.

|
Embed
Progress spinner
odd
odd

@Miraz Yes, I see how knowing the basics really would be helpful for text manipulation, it’s just that I think it’s very hard to read, (to the untrained eye, at least).

PS: I’m wondering if I shouldn’t take the crossword puzzles tutorial too. But the class you signed up for was full, so I have to pick a later one.

|
Embed
Progress spinner
Miraz
Miraz

@odd It is hard to read, but just like with reading books, you don't start with the 800 page densely written novels, you start with the ABCs. A tiny bit of Regular Expressions can go a long way.

|
Embed
Progress spinner
Miraz
Miraz

@odd This is specially for you! miraz.me/2021/03/2...

|
Embed
Progress spinner
odd
odd

@Miraz Yes, thanks! 😊 I just skimmed through it. My head is in hibernation just now, so I think I’ll look closer at it tomorrow.

|
Embed
Progress spinner
Miraz
Miraz

@odd 😀 My only worry is that some Grep expert will jump in and say: “Of course you could do all that with this more elegant [much more complex pattern]!" But explanation rather than elegance was my goal.

|
Embed
Progress spinner
crossingthethreshold
crossingthethreshold

@Miraz That's what I tell myself, spend some time learning regex, and then I look the other way...or find another way to find a solution. I just know the satisfaction that I feel when I make just a little progress.

|
Embed
Progress spinner
Miraz
Miraz

@crossingthethreshold My intro will only take 5 minutes or less to read. 😀 Take a look.

|
Embed
Progress spinner
crossingthethreshold
crossingthethreshold

@Miraz I’ve bookmarked it.

|
Embed
Progress spinner
crossingthethreshold
crossingthethreshold

@Miraz That was very helpful. Thank you. I am going to save it for future reference. Like you I have BBEdit, and see that it has a very comprehensive Help section on grep. Taking a deep breath and diving in!

|
Embed
Progress spinner
Miraz
Miraz

@crossingthethreshold Ah yes, BBEdit uses slightly different things — eg find ([a-z]+) and replace with \1 but the user manual is extremely helpful. Also, under the Search menu be sure to choose Pattern Playground which will show the results live without implementing them.

|
Embed
Progress spinner
crossingthethreshold
crossingthethreshold

@Miraz Pattern Playground sounds like something I should use. I can imagine me making one or two mistakes as I figure this out. But thank you for the kick start!

|
Embed
Progress spinner
In reply to
Miraz
Miraz

@crossingthethreshold 🤣 “One or two mistakes”. If you do that you'll be a genius! Always work on a copy — I learned the hard way. I’ve made so many mistakes! It's easy to accidentally replace the whole document with something, instead of just the bits you meant to replace.

|
Embed
Progress spinner
crossingthethreshold
crossingthethreshold

@Miraz Noted! 📝

|
Embed
Progress spinner
odd
odd

@Miraz Yes, there is always those who would optimize by making the code almost illegible to other people. The more code reads like plain English, the easier it is to maintain.

|
Embed
Progress spinner