in reply to Parsing of a string

I'm a bit puzzed about the way everybody always comes with solutions based on assumptions. I would think, the correct response is: be more specific!

Instead of providing an example string, with some notes, rethink your problem:
- what is the exact pattern my strings follows?
- what are the constant parts, which parts change?
- what rules apply to the changing parts?

You will notice that, ooce you gat the answers to the above questions, you have the solution to your problem

Paul

Replies are listed 'Best First'.
Re^2: Parsing of a string
by ww (Archbishop) on Mar 11, 2005 at 14:45 UTC
    Tend to agree with most of your points, rev_1318, but having a hard time trying to parse their applicability here... because OP wrote ":COOL_CALL, an option" is static" -- which is pretty much an ironclad (if, 'incomplete')answer for part 2 of your question.

    Seems to me that knowing we have a (mutable) hex value followed immediately by a ":COOL_CALL" makes writing a regex perfectly straightforward... at least in the practical world where the string 'colon, COOL, uline, CALL" seems unlikely to appear accidentally.

    OTH, and to highlight my general agreement though, OP does NOT say that there will be a desired hex value immediately preceeding ":COOL_CALL" and (ymmv) I can only INFER (from the fact that its variability/non_variability is NOT addressed) that ",xx:MTV = " is potentially variable, and hence, should not be used by the regex.

    ie, greater precision in the question from OP can be a big help