Difference between revisions of "Documentation:How to use the Parser"

Jump to navigation Jump to search
Line 92: Line 92:
Sometimes the way the source text is organised is so unfortunate that it would take a crazy amount of time to prepare it for the Parser manually. In such cases you have to use a thing called regular expressions. You know how in many text editors you can search and replace pieces of text? Regular expressions is just a more advanced way of doing search and replace.
Sometimes the way the source text is organised is so unfortunate that it would take a crazy amount of time to prepare it for the Parser manually. In such cases you have to use a thing called regular expressions. You know how in many text editors you can search and replace pieces of text? Regular expressions is just a more advanced way of doing search and replace.


Let me give you an example of the situation where regular expressions have helped me. Open the list of Roman consuls on Wikipedia and examine that list. You see how most of the time there were 2 or more consuls in each year. In the wiki text it looks like this:
Let me give you an example of the situation where regular expressions have helped me. Open the [https://en.wikipedia.org/wiki/List_of_Roman_consuls list of Roman consuls] on Wikipedia and examine that list. You see how most of the time there were 2 or more consuls in each year. In the wiki text it looks like this:


<blockquote><poem><nowiki>
<blockquote><poem><nowiki>

Navigation menu