Loading ...
Sorry, an error occurred while loading the content.

21553zero or more--or not?

Expand Messages
  • beshtin
    Feb 21, 2011
    • 0 Attachment
      I'm using the following clip:
      ^!Jump Doc_Start
      ;long line follows
      ^!Replace "^(\d+) ([(]\d+[)]) (.*?) ([A-Z]{3}) (\d+) (\d+) (.*)">>"<tr><td>$1</td><td>$2</td><td>$3</td><td>$4</td><td align=right>$5</td><td align=right>$6</td></tr>" RAWS
      ;long line prior
      ^!Jump Doc_End

      to turn text like this:
      1 (2) LUNDGREN, ANNA NOR 9430 22 900 200 125
      2 (1) SMALL, KELLY USA 8835 15
      3 (3) POTREVA, ANYA RUS 7155 19 125 60 1
      4 (5) SUROVA, MARIA RUS 5086 20 225 120 120

      into simple HTML table rows like this:

      <tr><td>1</td><td>(2)</td><td>LUNDGREN, ANNA</td><td>NOR</td><td align=right>9430</td><td align=right>22</td></tr>
      2 (1) SMALL, KELLY USA 8835 15
      <tr><td>3</td><td>(3)</td><td>POTREVA, ANYA</td><td>RUS</td><td align=right>7155</td><td align=right>19</td></tr>
      <tr><td>4</td><td>(5)</td><td>SUROVA, MARIA</td><td>RUS</td><td align=right>5086</td><td align=right>20</td></tr>

      except, as you can see, it fails to convert the second line, because that line is missing the last three sets of characters.

      I thought the (.*) would take any remaining characters OR NONE, but it doesn't seem to accept none.

      What is my error?
    • Show all 6 messages in this topic