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

Jump to navigation Jump to search
Line 109: Line 109:
</nowiki></poem></blockquote>
</nowiki></poem></blockquote>


What you want to do is to turn a block of text that looks like this:<blockquote><poem><nowiki>
What I needed to do was to turn a block of text that looks like this:<blockquote><poem><nowiki>
| align=center | 502
| align=center | 502
| [[Opiter Verginius Tricostus (consul 502 BC)|Opet. Verginius Tricostus]]
| [[Opiter Verginius Tricostus (consul 502 BC)|Opet. Verginius Tricostus]]
Line 120: Line 120:
</nowiki></poem></blockquote>
</nowiki></poem></blockquote>


You can do it manually, but the problem is that there is almost 500 years worth of Roman consuls (I only did consuls of Roman Republic).  
I could have done it manually, but the problem is that there is almost 500 years worth of Roman consuls (I only did consuls of Roman Republic).  


Regular expressions allowed me to find every such block of text and do the needed replacements automatically. In this particular case I created the final syntax right in the text editor without using Parser at all. But a lot of times I use the text editor to prepare the text for the Parser. It all depends on the situation.
Regular expressions allowed me to find every such block of text and do the needed replacements automatically. In this particular case I created the final syntax right in the text editor without using Parser at all. But a lot of times I use the text editor to prepare the text for the Parser. It all depends on the situation.

Navigation menu