Hi, I am a novice in Perl and Regex, trying to encode some rules of Sanskrit grammar using Perl. I want to replace a sequence of two (a or â) with â. So I tried this code:
s/[aâ][aâ]/â/; I even tried this: s/[aâ]{2}/â/;So I had to use the following, which works OK, but should be equivalent of the first:
s/([aâ]a|[aâ]â)/â/;Please tell me what is wrong with the first expression!
In reply to Regex question by hnn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |