I am new at autohotkey and any code including activity :) I want to extract some parts from the below sample haystack and list them in a message box with order of appearence as a list ( if one item is found more than one it will be listed only one time, if it makes things easier they appear side by side no other listing item is placed between same list items )
My Sample Haystack:
Aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer elementum erat vitae urna pellentesque perm-anen-t1 condimentum. Curabitur vestibulum vehicula perm-anen-t1 porttitor. Ut ac tellus et tellus auctor ornare. Aliquam volutpat purus in augue sagittis, eget bibendum lacus cursus. In vitae lorem ultrices, sollicitudin prot-esto-r7 nunc non, fringilla erat. Suspendisse qual-ifie-d6 at vehicula leo. Mauris imperdiet augue nec erat suscipit, eget aliquet nunc auctor. Sed felis eros, dictum non tincidunt ac, tempus et nunc.
Mauris vehicula auto-moti-v9 molestie fermentum. Morbi consectetur eros eget erat auto-moti-v9 aliquet, non dictum ipsum auto-moti-v9 sodales. Duis scelerisque mi non interdum condimentum.
Vivamus rutrum neque nunc, consequat porta susp-ende-d7 urna vehicula ac. Donec et tristique massa. Suspendisse dictum est at dui posuere condimentum. Etiam eleifend pharetra tortor, nec mollis magna congue at. Mauris libero nisi, posuere numbe-r1fi-t3 sit amet velit sit amet, consectetur scelerisque nulla. Maecenas elementum purus in sem lacinia, sit amet facilisis arcu ornare. Donec numbe-r1fi-t3 tempus dignissim lacinia. Pellentesque lacinia imperdiet quam, eu rutrum arcu. Maecenas et est eu nibh suscipit vulputate nec quis massa. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean eu sagittis orci. Integer consequat nec ligula non noven-ber1-25 tincidunt. Vivamus vel venenatis noven-ber1-25 nibh. Quisque pharetra orci id pharetra laoreet. Phasellus augue enim, tincidunt noven-ber1-25 pellentesque mi ac, fringilla auctor orci.
My Desired List:
1. perm-anen-t1
2. prot-esto-r7
3. qual-ifie-d6
4. auto-moti-v9
5. susp-ende-d7
6. numbe-r1fi-t3
7. noven-ber1-25
I tried loop, RegexMatch, RegexReplace, InStr
etc. but can't manage. In tutorial it talks about an array but when I use RegexMatch
match1 is listed right but match 2 is empty. It can be very useful if one can solve this using Regular Expressions
.