In programming to select and extract necessary information from website you can use regex or regular expression - symbolic logic to select or exclude information. In Python there is library Regular Expression Syntax, which explains syntax and present samples. Though it is complicated to understand and to write by himself even after searching Stackoverflow. So use search regex tutorial on Google. Search show to use website RegexOne Learn Regular Expressions with simple, interactive exercises. Interactive Tutorial and Regular expressions 101 Interactive website to read to understand and to practice regex. With regex you can write complex commands in Scrapy spider to extract only necessary information or you can process text file with regex also. Today I program integration of automatic solution for Facebook groups matching with their members number, which I have already developed. I found that Chrome Extension LinkKlipper has option to select text file for download with regex option. So I put /groups/ in regex field and LinkKlipper will download only those links which contain word 'groups' in it. Unecssary links with 'permalink' word will deleted automatically by python code, so for sake of simplity I avoid more complex regex syntax.
Small business requires many tasks to be completed on PC. With python language you need to learn to integrate many libraries which can run your daily tasks or to code own solutions to outpace competitors. There are billions lines of python codes, so the limit is integrating knowledge and efficiency. To run business you can predict demand, use artificial intelligence to bring leads, automate routines tasks, integrate other programs. From salesmen to scientists use coding. Become curious!
Search This Blog
Saturday, September 30, 2017
Regular expression matching operations in programming
Labels:
python,
regular expression,
tutorial
Location:
Vilnius, Lietuva