Click that link now if you want to open the page in a new tab/window. So what we are going to do today is parse a website to get our IP and location information to use in a skin. I would encourage you to either now or later open up a browser tab/window here: Regular expression options and check out the various references and guides available. It is NOT a full-blown guide to regular expressions. This guide is meant to be simple and very "WebParser" focused. So we have told RegExp to search for the text "" then capture (.*) everything after it in StringIndex 1 of the measure until it sees "", where it will stop capturing. You have a web page you want to get the "title" tag from. These directives are not required, but you will find that they are generally the right way to go when using WebParser in Rainmeter, and you will want to use "(?siU)" to start your RegExp most of the time. The "U" tells RegExp to be "ungreedy", meaning that it will return only the first instance of the match on the search string. Matches will work on both upper and lower case. The "i" tells the search to be "case insensitive". For example, if you search for "Every good boy deserves favor" and it is split on two lines in the output, it will still match. The "s" tells RegExp to ignore line breaks and tabs when doing a search. The (?siU) starts with the ? character to tell the regular expression that what follows inside the parentheses are directives for the overall expression. This is used to "skip" to the next search you want to do. * in parentheses, and will not use a StringIndex number. It will not be returned as you did not enclose the. * - This will contain data from the website which is between this set of search/return parameters and the next one.
0 Comments
Leave a Reply. |