Regular Expression: how match a whole word?
Hi All,
First of all, I’d express all my gratitude to all whom will help me about this topic.
I have a question about the Regular Expression Engine, the issue of mine is: Can I match an entire word using negative clauses?
In English: I’ve a simple text as: “man,men,mon,mu n,car,cer,cir” and I’d match all the words which don’t contain in the first position the letter “m”, in the second “a” and in the third “n”. In this way:
Text: “man,men,mon,mu n,car,cer,cir”
Word To Search: all the words which don’t contain the letters [m][a][n] in the co respective positions.
Pattern: “[^m][^a][^n]” (surely incorrect)
If I use as Pattern [m][a][n], I’m able to find the word “man”, but how I could the reverse process?
I’d like to retrieve all others words except this, is it possible?
Sorry, for this kind of simple question, I tried several times before creating this post, but all the searches of mine about this topic have been unsatisfied.
Hi All,
First of all, I’d express all my gratitude to all whom will help me about this topic.
I have a question about the Regular Expression Engine, the issue of mine is: Can I match an entire word using negative clauses?
In English: I’ve a simple text as: “man,men,mon,mu n,car,cer,cir” and I’d match all the words which don’t contain in the first position the letter “m”, in the second “a” and in the third “n”. In this way:
Text: “man,men,mon,mu n,car,cer,cir”
Word To Search: all the words which don’t contain the letters [m][a][n] in the co respective positions.
Pattern: “[^m][^a][^n]” (surely incorrect)
If I use as Pattern [m][a][n], I’m able to find the word “man”, but how I could the reverse process?
I’d like to retrieve all others words except this, is it possible?
Sorry, for this kind of simple question, I tried several times before creating this post, but all the searches of mine about this topic have been unsatisfied.
Comment