On the multi-line graphic below there is a character I am trying find the coordinates of a bold-red asterisk on black background,
Example 1. In the case below it is;
Notes:
1. The ^ and < around the graphic are mine added for clarity.
2. In all cases, the first and last lines are +---------+ as indicated.
3. Only one asterisk on the graphic is red.
This has turned out more complex than I'd thought, I'm thinking some mix of gsub.find and triggers... Any clues to point me in the right direction appreciated very much.
Example 1. In the case below it is;
+------------------------------+
| * ? |
| *. | <
| * . .. |
+------------------------------+
^
X = 17
Y = 2
Example 2. In this case it is;
+------------------------------+
| . . . . |
| . . .|
| |
| . * |
| . |
| . |
| . * .|
| * * ? | <
| . . |
+------------------------------+
^
X = 9
Y = 8
Notes:
1. The ^ and < around the graphic are mine added for clarity.
2. In all cases, the first and last lines are +---------+ as indicated.
3. Only one asterisk on the graphic is red.
This has turned out more complex than I'd thought, I'm thinking some mix of gsub.find and triggers... Any clues to point me in the right direction appreciated very much.