This appears to be more of a language grammar question than just a regex question.

for example: lock tubes 1 2 3 on raider dispersion 2 offset 5
lock tubes 1 2 3 on raider dispersion 2 offset 5
"lock" and "on" are "noise tokens".
why wouldn't this mean the same thing?
di 2 of 5 t 1 2 3 rai
raider(this target perhaps amongst many), dispersion 2, offset 5 deg, tubes 1,2,3.
Also, sounds like instead of "rai di 2 of 5 t 1 2 3", I could say : raider d 2 o 5 f 1 2 3 ? raider p(dispersion) 2 o(offeset) 5 fire(tubes) 1 2 3?

It appears to me that the grammar needs to be worked out for each "command" to the crew.

Interesting problem.

I think that it is easy to tell if each token on command line is number or not and if it is a alpha token, whether that is unique or not - I think the hard part is to determine what happens. I'm sure that there must be other commands like "dive and maintain 300 ft" or whatever.


In reply to Re: Regex - Matching prefixes of a word by Marshall
in thread Regex - Matching prefixes of a word by SuicideJunkie

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.