+ else if (nsqid > -1)
+ {
+ dynamic = true;
+ sep = parseTargetAndLabel(sep, nsqid, link);
+
+ int p;
+ url_prefix = link.substring(sep + 1, nsqid);
+ if (link.indexOf("$" + SEQUENCE_NAME + "=/") == nsqid
+ && (p = link.indexOf("/=$", nsqid + 16)) > nsqid + 16)
+ {
+ // Extract Regex and suffix
+ url_suffix = link.substring(p + 3);
+ regexReplace = link.substring(nsqid + 16, p);
+ try
+ {
+ com.stevesoft.pat.Regex rg = com.stevesoft.pat.Regex.perlCode("/"
+ + regexReplace + "/");
+ if (rg == null)
+ {
+ invalidMessage = "Invalid Regular Expression : '"
+ + regexReplace + "'\n";
+ }
+ } catch (Exception e)
+ {
+ invalidMessage = "Invalid Regular Expression : '" + regexReplace
+ + "'\n";
+ }
+ }
+ else
+ {
+ regexReplace = null;
+ // verify format is really correct.
+ if (link.indexOf("$" + SEQUENCE_NAME + "$") == nsqid)
+ {
+ url_suffix = link.substring(nsqid + 15);
+ regexReplace = null;
+ }
+ else
+ {
+ invalidMessage = "Warning: invalid regex structure for URL link : "
+ + link;
+ }
+ }
+ }