Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
  • First - doesn't BioPerl have a few functions that will do this?
  • I don't think so.
As for code ... you still don't have all the requirements laid out yet. Specifically:
  • * Do the matches have to be in the order specified? For example, what should @new_query contain if $string = 'EICHENLEBAUMSCHU'?
  • @new_query = qw( EIC, LEBAUMSCHU);
  • * What happens if something in @query isn't there? For example, $string = 'XXX'.
  • @new_query = @query
  • * What happens if there is more than one match? For example, $string = 'EICBAUMEIC'.
  • will not be the case
  • * What happens if something isn't there and there's two matches on something else?
  • remove double
  • * What happens if one element in @query fits into another element? For example, @query = qw( BAUM AU ).
  • @new_query = qw(BAUM)
  • * What happens if there are two possible solutions? For example, $string = 'BAABAB' and @query = qw( AA BA ).
  • will not be the case
  • I'm sure there are other possibilities that I didn't think of in the first five minutes of looking at the problem. Remember - if you can't explain the problem to a teddy bear, you can't explain the problem to a computer. >thanks for good comments Murcia

    In reply to Re^2: Regexp string concat by Murcia
    in thread Regexp string concat by Murcia

    Title:
    Use:  <p> text here (a paragraph) </p>
    and:  <code> code here </code>
    to format your post; it's "PerlMonks-approved HTML":



    • Are you posting in the right place? Check out Where do I post X? to know for sure.
    • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
      <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
    • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
    • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-18 18:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found