camosilver311
In Runtime
- Messages
- 140
To answer the question about what to do with the code on Stackoverflow: the OP there is using vim which is a text editor primarily on *nix platforms but also available in some form on windows. I wouldn't recommend that path for you, this is an easy task in notepad++.
I've just tested the provided sample data and the only regex I needed was
Find what: County.*
Replace with: County
To get the "cartesian product" of the two lists eg.
list 1
Accomack County
Ada County
Adair County
Adams County
Addison County
Aiken County
Aitkin County
list 2
widgets
find widgets
search widgets
lookup widgets
widgets lookup
widget search
You can use a spreadsheet application (I'm using Gnumeric)
1) Paste one list into a column (start in cell A2)
2) Use paste special -> transpose to paste the other list as a row (start in cell B1)
3) You now effectively have a matrix, in cell B2 enter =concatenate($A2," ",B$1) into the formula bar
4) The result of this should be "Accomack County widgets"
5) Drag down to autocomplete the first column
6) Highlight the contents of the first column and drag sideways to autocomplete the matrix
7) Highlight the contents of the matrix and paste this into notepad++
8) Use notepad++ find and replace in extended mode
Find what: \t
Replace with: \n
End result:
Accomack County widgets
Accomack County find widgets
Accomack County search widgets
Accomack County lookup widgets
Accomack County widgets lookup
Accomack County widget search
Ada County widgets
Ada County find widgets
Ada County search widgets
Ada County lookup widgets
Ada County widgets lookup
Ada County widget search
Adair County widgets
Adair County find widgets
Adair County search widgets
Adair County lookup widgets
Adair County widgets lookup
Adair County widget search
Adams County widgets
Adams County find widgets
Adams County search widgets
Adams County lookup widgets
Adams County widgets lookup
Adams County widget search
Addison County widgets
Addison County find widgets
Addison County search widgets
Addison County lookup widgets
Addison County widgets lookup
Addison County widget search
Aiken County widgets
Aiken County find widgets
Aiken County search widgets
Aiken County lookup widgets
Aiken County widgets lookup
Aiken County widget search
Aitkin County widgets
Aitkin County find widgets
Aitkin County search widgets
Aitkin County lookup widgets
Aitkin County widgets lookup
Aitkin County widget search
I appreciate the help... don't have time to mess with it tonight but will try that out tomorrow and report back!