title: How do I manipulate strings with regex?
body: <p>I'm fairly new to java and I'm trying to get a part of a string:</p>
  
  <p>Say I have a URL and I want a specific part of it, such as a filename:</p>
  
  <pre><code>String url = "http://example.com/filename02563.zip";
  </code></pre>
  
  <p>The 02563 will be generated at random every time and it's now always 5 characters long.
  I want to have java find what's between "m/" (from .com/) to the end of the line to get the filename alone.</p>
  
  <p>Now consider this example:</p>
  
  <p>Say I have an html file that I want a snippet extracted from. Below would be the extracted example:</p>
  
  <pre><code>&lt;applet name=someApplet id=game width="100%" height="100%" archive=someJarFile0456799.jar  code=classInsideAJarFile.class mayscript&gt;
  </code></pre>
  
  <p>I want to extract the jar filename, so I want to get the text between "ve=" and ".jar". The extension will always be ".jar", so including this is not important.</p>
  
  <p>How would I do this? If possible, could you comment the code so I understand what's happening?</p>