|
To help learn how to understand the regex needed to perform this kind of operation, start by trying to express in words, the most generalized translation that will work. In your case, I would say something like "remove all characters between the string '-->' and the end of the string." Having done this much, the regular expression that performs this operation almost writes itself. This applies, of course, to the semantic aspects of the regex. The syntax, well, you just have to learn and memorize that part.
--- rod.
|