I have a text file called a.txt that has this elements in it:
fall#i#1 fall (as a fruit) (v.) fall jatuh fall (as a fruit) (v.) jatuh* t͡ʃampaʔ
dog#n#1 dog dog anjing dog anjing ŋand͡ʒi
wing#n#1 wing wing sayap wing sayap kopaʔ
fly#i#1 fly (v.) fly (vb) terbang fly (v.) terbang tobaŋ
mosquito#n#1 mosquito mosquito nyamuk mosquito nyamuk ɲamuʔ
flower#n#2 flower flower bunga (yg jadi buah), kuntum flower bunga* buŋo
sky#n#1 sky sky langit sky langit* ʔlaŋɪt
First, I need a regular expression to match the lines that have final post-alveolar consonant like [ŋɡʔ] the out put should look like this:
fall#i#1 fall (as a fruit) (v.) fall jatuh fall (as a fruit) (v.) jatuh* t͡ʃampaʔ
wing#n#1 wing wing sayap wing sayap kopaʔ
fly#i#1 fly (v.) fly (vb) terbang fly (v.) terbang tobaŋ
mosquito#n#1 mosquito mosquito nyamuk mosquito nyamuk ɲamuʔ
Second, I need a regular expression to match the post-alveolar at the beginning of the words out put should look like this:
dog#n#1 dog dog anjing dog anjing ŋand͡ʒi
sky#n#1 sky sky langit sky langit* ʔlaŋɪt
Third, I need a regular expression to match the post-alveolar between vowels like this output:
flower#n#2 flower flower bunga (yg jadi buah), kuntum flower bunga* buŋo
sky#n#1 sky sky langit sky langit* ʔlaŋɪt
I used to use this regex in Ubuntu terminal to match them all:
grep -P '\b[ʔŋɡk]|[ʔŋɡk]\b|[aiueo][ʔŋɡk][aiueo]' a.txt
but I couldn't find a regex to match them separately I mean once match post-alveolar at the end another regex match only at the beginning and the other regex match between vowels can any one please help me with that thanks