Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » How to create a query pattern for this source?
How to create a query pattern for this source? [message #58624] Mon, 29 September 2008 23:36 Go to next message
Menon is currently offline Menon
Messages: 48
Registered: July 2009
Member
Hi
I made some progress with the query pattern using the Mylyn Generic web
connector. Using the Query pattern"<a
href="/.../bug/default.aspx\?bug_id\=(.+?)">.+?", I get one record only
and I am getting an erro also saying " Require two Matching groups(taskId
and Decription")

I am trying to create a Query Pattern for the source below: How do I
craete the correct Query Pattern? Any help appreciated.
Thanks
Sunanda

<td id="Results_ctl03_ctl00"><font face="Verdana" color="Black"><a
href="/.../bug/default.aspx?bug_id=3772">3772</a></font> </td><td
id="Results_ctl03_ctl01"><font face="Verdana" color="Black"><div style="{
font-family: Verdana; font-size: 10pt; }"
id="rta64cbb4975b44aa0a56be65ccc0701f1"></div><script> var objDiv =
document.getElementById('rta64cbb4975b44aa0a56be65ccc0701f1' );
objDiv.innerHTML = "+++++ srmenon1 9/26/2008 11:12:32 AM<br><br>Testing";
</script></font></td>
</tr><tr valign="top" bgcolor="White">
Re: How to create a query pattern for this source? [message #58673 is a reply to message #58624] Tue, 30 September 2008 05:53 Go to previous messageGo to next message
Jörg Thönnes is currently offline Jörg Thönnes
Messages: 229
Registered: July 2009
Senior Member
On 09/30/08 01:36, Menon wrote:
> Hi I made some progress with the query pattern using the Mylyn Generic
> web connector. Using the Query pattern"<a
> href="/.../bug/default.aspx\?bug_id\=(.+?)">.+?", I get one record only
> and I am getting an erro also saying " Require two Matching
> groups(taskId and Decription")

Yes, as you provide only one pair of parentheses, you will get at most one result per line.
How about "<a href="/.../bug/default.aspx\?bug_id\=(.+?)">(.+?)</a>"?

> I am trying to create a Query Pattern for the source below: How do I
> craete the correct Query Pattern? Any help appreciated.
> Thanks
> Sunanda
>
> <td id="Results_ctl03_ctl00"><font face="Verdana" color="Black"><a
> href="/.../bug/default.aspx?bug_id=3772">3772</a></font> </td><td
> id="Results_ctl03_ctl01"><font face="Verdana" color="Black"><div
> style="{ font-family: Verdana; font-size: 10pt; }"
> id="rta64cbb4975b44aa0a56be65ccc0701f1"></div><script> var objDiv =
> document.getElementById('rta64cbb4975b44aa0a56be65ccc0701f1' );
> objDiv.innerHTML = "+++++ srmenon1 9/26/2008 11:12:32
> AM<br><br>Testing"; </script></font></td>
> </tr><tr valign="top" bgcolor="White">

Please tell us the intended result, e.g. is it

3722 3772

or

3722 Testing

or whatever...

Thanks, Jörg
Re: How to create a query pattern for this source? [message #58746 is a reply to message #58673] Tue, 30 September 2008 16:18 Go to previous messageGo to next message
Menon is currently offline Menon
Messages: 48
Registered: July 2009
Member
Thanks Jorg
Yes I am trying to show a bunch of tasks as below:
3772 Testing
3773 Testing 1
...........
...........

I tried <a href="/hsd/cts_hsd/bug/default.aspx\?bug_id\=(.+?)">(.+?)</a >
But it also gives "No matching results"
Thanks for your help
Sunanda
Re: How to create a query pattern for this source? [message #58769 is a reply to message #58746] Tue, 30 September 2008 17:31 Go to previous messageGo to next message
Jörg Thönnes is currently offline Jörg Thönnes
Messages: 229
Registered: July 2009
Senior Member
On 09/30/08 18:18, Menon wrote:
> Thanks Jorg
> Yes I am trying to show a bunch of tasks as below:
> 3772 Testing
> 3773 Testing 1
> ..........
> ..........
>
> I tried <a href="/hsd/cts_hsd/bug/default.aspx\?bug_id\=(.+?)">(.+?)</a >
> But it also gives "No matching results"

The pattern

<a href="/.../bug/default.aspx\?bug_id\=(.+?)">(.+?)</a>

should return

3772 3772
3773 3773
....

And the pattern

<a href="/.../bug/default.aspx\?bug_id\=(.+?)">.+?<br><br>(.+?) "; </script>

should return the correct result. Is 'href="/.../bug' really written with "..."?
Otherwise replace with the real value, e.g. "hsd/cts_hsd"

Cheers, Jörg
Re: How to create a query pattern for this source? [message #58793 is a reply to message #58673] Tue, 30 September 2008 20:13 Go to previous message
Menon is currently offline Menon
Messages: 48
Registered: July 2009
Member
Thanks very much Jorg
I was able to show my tasks and title, using the Query Pattern
<a
href="/.../bug/default.aspx\?bug_id\=(\d+)">.+?</a>.+?<br ><br>(.*?)".*?</td>
It shows
3772 Testing
3773 Test 1
....
Sunanda
Re: How to create a query pattern for this source? [message #593618 is a reply to message #58624] Tue, 30 September 2008 05:53 Go to previous message
Jörg Thönnes is currently offline Jörg Thönnes
Messages: 229
Registered: July 2009
Senior Member
On 09/30/08 01:36, Menon wrote:
> Hi I made some progress with the query pattern using the Mylyn Generic
> web connector. Using the Query pattern"<a
> href="/.../bug/default.aspx\?bug_id\=(.+?)">.+?", I get one record only
> and I am getting an erro also saying " Require two Matching
> groups(taskId and Decription")

Yes, as you provide only one pair of parentheses, you will get at most one result per line.
How about "<a href="/.../bug/default.aspx\?bug_id\=(.+?)">(.+?)</a>"?

> I am trying to create a Query Pattern for the source below: How do I
> craete the correct Query Pattern? Any help appreciated.
> Thanks
> Sunanda
>
> <td id="Results_ctl03_ctl00"><font face="Verdana" color="Black"><a
> href="/.../bug/default.aspx?bug_id=3772">3772</a></font> </td><td
> id="Results_ctl03_ctl01"><font face="Verdana" color="Black"><div
> style="{ font-family: Verdana; font-size: 10pt; }"
> id="rta64cbb4975b44aa0a56be65ccc0701f1"></div><script> var objDiv =
> document.getElementById('rta64cbb4975b44aa0a56be65ccc0701f1' );
> objDiv.innerHTML = "+++++ srmenon1 9/26/2008 11:12:32
> AM<br><br>Testing"; </script></font></td>
> </tr><tr valign="top" bgcolor="White">

Please tell us the intended result, e.g. is it

3722 3772

or

3722 Testing

or whatever...

Thanks, Jörg
Re: How to create a query pattern for this source? [message #593659 is a reply to message #58673] Tue, 30 September 2008 16:18 Go to previous message
Menon is currently offline Menon
Messages: 48
Registered: July 2009
Member
Thanks Jorg
Yes I am trying to show a bunch of tasks as below:
3772 Testing
3773 Testing 1
...........
...........

I tried <a href="/hsd/cts_hsd/bug/default.aspx\?bug_id\=(.+?)">(.+?)</a >
But it also gives "No matching results"
Thanks for your help
Sunanda
Re: How to create a query pattern for this source? [message #593673 is a reply to message #58746] Tue, 30 September 2008 17:31 Go to previous message
Jörg Thönnes is currently offline Jörg Thönnes
Messages: 229
Registered: July 2009
Senior Member
On 09/30/08 18:18, Menon wrote:
> Thanks Jorg
> Yes I am trying to show a bunch of tasks as below:
> 3772 Testing
> 3773 Testing 1
> ..........
> ..........
>
> I tried <a href="/hsd/cts_hsd/bug/default.aspx\?bug_id\=(.+?)">(.+?)</a >
> But it also gives "No matching results"

The pattern

<a href="/.../bug/default.aspx\?bug_id\=(.+?)">(.+?)</a>

should return

3772 3772
3773 3773
....

And the pattern

<a href="/.../bug/default.aspx\?bug_id\=(.+?)">.+?<br><br>(.+?) "; </script>

should return the correct result. Is 'href="/.../bug' really written with "..."?
Otherwise replace with the real value, e.g. "hsd/cts_hsd"

Cheers, Jörg
Re: How to create a query pattern for this source? [message #593681 is a reply to message #58673] Tue, 30 September 2008 20:13 Go to previous message
Menon is currently offline Menon
Messages: 48
Registered: July 2009
Member
Thanks very much Jorg
I was able to show my tasks and title, using the Query Pattern
<a
href="/.../bug/default.aspx\?bug_id\=(\d+)">.+?</a>.+?<br ><br>(.*?)".*?</td>
It shows
3772 Testing
3773 Test 1
....
Sunanda
Previous Topic:Local task commit message after updating to Mylyn 3.0.2
Next Topic:Attach context for generic web connector based repostories
Goto Forum:
  


Current Time: Tue Sep 23 00:32:52 GMT 2014

Powered by FUDForum. Page generated in 0.03592 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software