Re[2]: Pattern Regular Expressions: Consecutive ORs not handled corr ectl y

2005-05-04 Thread Sergey Samokhodkin
Hello Daniel, Tuesday, May 3, 2005, 10:08:05 PM, you wrote: Just of pure academic interest, let me to object on the issue. DFS That's a different pattern than the one you originally posted. Since DFS I now can see from your test case that you are using matches(), I can DFS tell you the problem

Re: Re[2]: Pattern Regular Expressions: Consecutive ORs not handled corr ectl y

2005-05-04 Thread Daniel F. Savarese
I wrote: The result will not be bar, it's bart. If you want foo|foot to match foot you've either got to rewrite it as foot|foo or as ^(?:foo|foot)$. For example, echo foot | perl -pi -e 's/^(?:foo|foot)$/bar/g' I should clarify that this is only if you want the entire input to match. If you