I am looking to create a multiple combination of a sentence based on Curly brackets and "|" Separators in the text. We usually call this as nested spintax .
Column A is the Primary Key ID and based on it The column B should generate multiple combinations and Out put should be generated in column E and F
These are the common patterns of my data.
- Every Curly bracket contains a word separator with "|" delimiter
- The Output is shown in the Column F for every combination of words using curly brackets and "|" delimiter
Column A is the Primary Key ID and based on it The column B should generate multiple combinations and Out put should be generated in column E and F
These are the common patterns of my data.
Book1 | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | ID | Text | ID | Text Output | ||||
2 | SP-001 | {Nice|Cool|Beautiful} photo. | SP-001 | Nice photo. | ||||
3 | SP-002 | {Hello|Hi} {World|People}! | SP-001 | Cool photo. | ||||
4 | SP-003 | {hello there my {friend|dude|buddy|pal} | SP-001 | Beautiful photo. | ||||
5 | SP-004 | Very {interesting|beautiful} woman {image|photo|picture} | SP-002 | Hello World! | ||||
6 | SP-005 | This is nested {{very|quite} deeply|deep}. | SP-002 | Hi People! | ||||
7 | SP-002 | Hello People! | ||||||
8 | SP-002 | Hi World! | ||||||
9 | SP-003 | hello there my friend | ||||||
10 | SP-003 | hello there my dude | ||||||
11 | SP-003 | hello there my buddy | ||||||
12 | SP-003 | hello there my pal | ||||||
13 | SP-004 | Very interesting woman image | ||||||
14 | SP-004 | Very interesting woman photo | ||||||
15 | SP-004 | Very interesting woman picture | ||||||
16 | SP-004 | Very beautiful woman image | ||||||
17 | SP-004 | Very beautiful woman photo | ||||||
18 | SP-004 | Very beautiful woman picture | ||||||
19 | SP-005 | This is nested very deeply. | ||||||
20 | SP-005 | This is nested quite deeply. | ||||||
21 | SP-005 | This is nested deep. | ||||||
22 | SP-005 | This is nested deeply. | ||||||
Sheet1 |