Using regular expressions
In some cases, it is desirable to go deeper than the tag structure.
We want to extract the % change
- table.tr[1].td[1].txt, match /[(](.*?)[)]/
We want to extract the day’s range for the stock:
- table.tr[2].td[0].txt, match/Day’s Range (.*)/, split /-/
-
Semantics
- match /(.....)/ returns a string
- match /(...) (...)/ returns a list of strings
- split /...../ returns a list of strings
regular expression operators can be used in cascade