Thread: Regex examples
View Single Post
Old 03-04-2014, 02:48 PM   #311
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
mm, i think you're going to run into problems pretty quickly if you start trying to get regex to understand words (as it sounds like you've already found out). i'd really recommend against trying to write a single regex to rule them all.

that said, i'd probably come at it the other way, so you'd include Κομπ in the look-ahead, rather than γερο in the capturing group:

...<same as before>...(?!Κομπ|\1)

the pipe | separating them means 'or'.

i have no idea if this makes syntactical sense to do this in the greek language, but it matches the examples you've provided.
mzmm is offline   Reply With Quote