Python Forum
Feel hard to learn the topic about " Parsing"
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Feel hard to learn the topic about " Parsing"
#1
So far I quite enjoyed learning Python from list and class to numpy and pandas. I have practiced ~80 algorithm type questions from leetcode and Hackrancker. They are nice web source for practice coding.

But the topic about parsing is always hard to learn for me, although the implementation of it is very useful. I feel it  is always easy to read someone's solution than doing the code by myself. I have searched and browsed several tutorial sources. They are understandable but still feel hard with the syntax such as (){}[]*+?. Too many symbol-like syntax. Hard to memorize.

So how do you learn the topic about parsing? What is the best way to learn it? Do you have any suggested online source to read?

Thanks,
L
Reply
#2
parsing what? (generic strings, HTML, XML?)

parsing with what? (Regex, BeautifulSoup, lxml, python builtin-string methods?)
Recommended Tutorials:
Reply
#3
(Jan-31-2017, 11:51 AM)landlord1984 Wrote: So far I quite enjoyed learning Python from list and class to numpy and pandas. I have practiced ~80 algorithm type questions from leetcode and Hackrancker. They are nice web source for practice coding.

But the topic about parsing is always hard to learn for me, although the implementation of it is very useful. I feel it  is always easy to read someone's solution than doing the code by myself. I have searched and browsed several tutorial sources. They are understandable but still feel hard with the syntax such as (){}[]*+?. Too many symbol-like syntax. Hard to memorize.

So how do you learn the topic about parsing? What is the best way to learn it? Do you have any suggested online source to read?

Thanks,
L

It's not "parsing" it's "regular expressions" (which aren't specific to Python....). If you google for that you'll find plenty of online resources. But IMHO the best thing to do is to read the "Owl book". It takes you from noob to guru status in a couple of days.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#4
If you still want to look at example python code, see: http://nullege.com/codes/search?cq=regex
And http://nullege.com/codes/search?cq=regex.compile

You can try other cq= values, for example, regex.allregex, regex.ASCII

Ofnuts has the best advise here. I've rarely met an O'Reilly book I didn't like
Reply
#5
(Jan-31-2017, 01:24 PM)Larz60+ Wrote: Ofnuts has the best advise here. I've rarely met an O'Reilly book I didn't like

Some are hard to read but that one reads like a novel.

Historical note: I never purchased it, I found it in a abandoned cupboard in a deserted open-space. Several months later, I put the newly acquired regexp knowledge to very productive use in a project, with one of the project members saying "these regular expressions look like something very powerful,  too bad I never had the strength to open the book I bought". And yes, you guess it, I figured he was the original owner of the book :)

(*) t'was my lucky day: next to it, a bootleg copy of Cale & Clapton's "Road to Escondido".
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#6
I did buy this book, back when I owned a house.

My wife and I decided the house was too much for us to contend with recently,
sold it and moved into an apartment. Many of my books are now in plastic bins,
and I don't know which one contains this book.

I do, however have the electronic version, but can't read that in my favorite
reading room, which is the tub in the bath.
Reply
#7
(Jan-31-2017, 03:42 PM)Larz60+ Wrote: ...

I do, however have the electronic version, but can't read that in my favorite
reading room, which is the tub in the bath.

Hah! I am planning to put a stand on the wall and a tablet on it.  Big Grin
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#8
(Jan-31-2017, 12:54 PM)Ofnuts Wrote:
(Jan-31-2017, 11:51 AM)landlord1984 Wrote: So far I quite enjoyed learning Python from list and class to numpy and pandas. I have practiced ~80 algorithm type questions from leetcode and Hackrancker. They are nice web source for practice coding. But the topic about parsing is always hard to learn for me, although the implementation of it is very useful. I feel it is always easy to read someone's solution than doing the code by myself. I have searched and browsed several tutorial sources. They are understandable but still feel hard with the syntax such as (){}[]*+?. Too many symbol-like syntax. Hard to memorize. So how do you learn the topic about parsing? What is the best way to learn it? Do you have any suggested online source to read? Thanks, L
It's not "parsing" it's "regular expressions" (which aren't specific to Python....). If you google for that you'll find plenty of online resources. But IMHO the best thing to do is to read the "Owl book". It takes you from noob to guru status in a couple of days.

Thanks. I gonna buy this book
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020