[Bioperl-l] Bug in remote Blasts scripts
Paul Gordon
gordonp@cbr.nrc.ca
Thu, 14 Feb 2002 18:44:57 -0400 (AST)
Of course, to make it really robust, an HTML parser should be used, but
I think that we can get it mostly there (except pathological cases).
Didn't somebody mention something about lenient parsers before? :-)
/(?:\s(?:name=['"]RID['"]|value=['"]([^>]+?)['"])[^>]*?){2}/is
Answer in $+, no matter the order of the attributes in the tag (or
intervening data), or the contents of "value". Of course, a good
programmmer would use /x and comment :-)
> > I've just changed the regexp for catching the RID:
> >
> > Original:
> > /RID" VALUE="(\S+)"/s
> >
> > Changed:
> > /name="RID" type="hidden" value="(\S+)"/s