java matches regex for variables
<p>I want to match any string that has the pattern</p>

<pre><code>{"id":"362237- 
any number of characters followed by
"http//:www.abc.com" 
any number of characters followed by
"id":"364121-
any number of characters followed by
"http://www.efg.com"
</code></pre>

<p>I want to match above pattern to the string below.</p>

<pre><code>[{"id":"362237-13","http//:www.abc.com"},{"id":"364075-13","http://www.xyz.com"},{"id":"364121-13","http://www.efg.com"}]
</code></pre>

<p>Code:</p>

<pre><code>String pttrn=".*{\"id\":"362237-.*\"http//:www.abc.com\".*\"id\":"364121-.*\"http://www.efg.com\".*";

String mtchr="[{\"id\":\"362237-13\",\"http//:www.abc.com\"},{\"id":\"364075-13\",\"http://www.xyz.com\"},{\"id\":\"364121-13\",\"http://www.efg.com\"}]";


        boolean b = Pattern.matches(pttrn, mtchr);
        System.out.println("b is !!" + b);
</code></pre>

<p>I was expecting b to be true but it returns false. I have got the regex wrong.</p>

<p>Please let me know how to fix it.</p>

<p>Thanks</p>
