regex are well worth the time to learn, useful in just about any language you use and very powerful.
Here is a good read that is kind of the defacto regex book. mastering regex
The O'Reilly book Mastering Regular Expressions is very complete if you really, really want to know all the gory details of regular expressions.
pattern.txt
is more of a reference manual not exactly a great introduction. I'm not entirely sure what would be one, though. I can recommend you Mastering regular expressions, but that's not free, and perhaps a bit more than you need ;-)
Also: be aware that Vim regular expressions are different from many others! Basic patterns (like this) will work, but some of the more advanced ones are different (like .*?
being .\{-}
in Vim). Still, once you grasp the idea behind it, it should be easy to port the idea to Vim ;-)
Python regular expressions are basically Perl Regex. There are a bunch of good O'Reilly books on Regex.
If it's specifically regular expressions you want to learn, this book is fucking awesome.
But Schwartz's book is very good too.
[edit: Missed a line when I saved; I'm not using vim keys in my browser] I loved this article! I hope you don't mind if I share a story.
I've been in IT professionally for 14 years, and computing for 35 years. I taught myself vim for log analysis, and it's paid off in so many ways that I evangelize about it.
Vim, by itself, is honestly only a bit useful if you give it only a surface examination. You can use Visual Mode (control V, then movement keys) to select blocks of text for removal, cutting, or pasting. However, a copy of Notepad++ will do the same, so at that level, meh. It's admittedly not user friendly at all coming in from the outside.
However, if you're willing to learn some Regex (and I can't recommend Mastering Regular Expressions (Amazon) strongly enough, then that's where vim really shines. I use it for cleaning up data daily, and between a strong understanding of regular expression, visual mode selection, and macros, I've done cleanup of data coming from odd sources in minutes that would have taken hours of work manually.
I'd love to give you a flat recipe on how to do some of what I do, but the thing about vim and data cleanup work is that the data coming at you for analysis is irregular, so your approach must be flexible. You learn the tools, not a recipe or two, and it takes time. I spent weeks in vim before it really clicked.
I spent time first in vimtutor (packaged with vim), and then w/ Mastering Regular Expressions. Once I had at least a rough understanding of :substitute (vim.wikia), that opened a lot of doors, and that's when I dropped using any other editor for raw text.
Here's an example of some of the things I find myself doing. I had a client the other day who had performed a change to an inventory control system that was filled with mistakes; the system has no undo, and the only record she had left (due to continued PEBKAC) was a PDF report she'd run before making things worse. Said PDF had data split across multiple lines, otherwise filled with garbage and oddball white spaces, and also had some duplicate rows within it. I exported it to text.
I needed to trim out all but two different forms of lines, then eliminate duplicates, then join the two altered line elements together into a single delimited line, flipping the last field from a negative to a positive number (or vice versa) which I could then use to make the corrections to her system. The end result was a 20,000 line file, so it was a lot longer before that.
I was able to transform the PDF in about 20 minutes.
Now, I've learned a few languages since, and I very well could have written a tool to do the job for me, however my relationship with massaging text in vim is such that, thanks to undo/redo, and the experience I've built up, it's actually faster for me to manipulate the file in real time than to alter script, execute, examine, adjust script, and repeat. Vim excels at working with large files, so while it's theoretically possible to do the same work in other editors, I've not found one that will handle massive sets of data with the same speed.
One other thought; if you are also willing to learn a little bit of Unix and pipeline, then invoking shell commands opens up a lot more doors, since Unix has massive amounts of tools and scripts available.
I really hope this helps you!
You could use a "regular expression" to extract the text, but you will have to learn regexes, and that is involved, and a gateway to harder things like Perl and shell, and likely to ruin your life.
You could extract the text with a Run JavaScript action, but you'll need to learn JavaScript and the HTML DOM which has its own, slightly more hip, perils. This approach probably makes the most sense.
Regexes aren't that hard. I learned when I was well over fifty. And now I teach them. Get the "Owl book". Reads like a novel. Guru status in a matter of weeks.
Nothing you can find online beats this book: Mastering Regular Expressions.
thank you so much kind stranger! i'm currently reading https://www.amazon.com/dp/0596528124 so this should become clear to me before long.
Welcome. Regex(Regular Expressions) allows you to parse text more efficiently. Mastering Regular Expressions is what you need to look into.
Buy Mastering Regular Expression and you'll essentially have the /[A-Z]/i guide for regular expressions.
You should read this instead