It is currently September 29th, 2024, 7:26 pm

Simple (?) RegEx question.

General topics related to Rainmeter.
Itseotle
Posts: 3
Joined: August 6th, 2013, 1:53 pm

Simple (?) RegEx question.

Post by Itseotle »

Hello again! I first want to thank the community for there written guides, useful links, and well.. other guidance! ^^ But despite those tools, I am still very confused by RegEx. What I am trying to do is create a Web parser for a forum to create my own "RSS Reader" of sorts.. without the RSS. All the threads in the forum are given a number prefix before there title. What I need to do is cut that prefix off. I am guessing you use RegEx for this but I fear without delving into a deeper understanding of it I can't figure out how to do this.

Here is a sample of the forum code:

Code: Select all

id="thread_title_64819">Setting up a subscription.</a>
What I know how to do is isolate the string between "title_" and "</a>" but since each thread has that unique identifier, I cannot figure out how to omit it. Any suggestions? I'm sure this is pretty simple for those that do know RegEx @_@

My code:

Code: Select all

RegExp=(?siU)thread_title_(.*)</a>
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Simple (?) RegEx question.

Post by moshi »

Code: Select all

RegExp=(?siU).*"thread_title_\d+">(.*)</a>