[TxMt] Little bit OT: regexp and javascript

Geir-Tore Lindsve lindsve at bluezone.no
Wed Mar 22 09:15:51 UTC 2006


Den 22. mar. 2006 kl. 09.24 skrev José Campos:

> Geir-Tore Lindsve <lindsve at bluezone.no> wrote:
>
>> I tried to copy the source into TextMate and use the regexp search in
>> TM to figure out the patterns to use, but I can't seem to solve it.
>> Any help are appreciated.
>>
>> As far as I can see, the weather data for a particular day are
>> enclosed by <tr><td class="idag" ... </tr>, but there is a lot of
>> space around the tags, which I presume must be included in the regexp
>> patterns.
>>
>> Anyone here which could kick me in the right direction when it comes
>> to these patterns?
>
>     Although it's early morning here, would I suggest :
>
>     Find: <tr>[\s\n]+<td\s+class\=\"idag(((.|\n)(?!</tr>))+).</tr>

Thanks! That seems to be right on the spot when it comes to one  
particular day, and I guess I can twist my brain enough to figure out  
how to find the individual data inside those blocks.

\s is space?

What does the pattern actually say between "idag" and </tr>?
--
Mvh/Regards
Geir-Tore Lindsve
lindsve at bluezone.no
http://www.lindsve.net


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2367 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20060322/b07f5711/attachment.p7s>


More information about the textmate mailing list