I have a question: How to search a string using a basic regular expression in Vi editor? How about using extended regular expression in Vi editor?. Is it a real difference between basic regular expression and extended regular expression? They have different syntaxes but the algorithm is the same. What is the logically correct answer for this question?

  • 1
    What do you mean by basic and extended regexp? Are you talking about very magic mode? – klaus Feb 18 at 3:41
  • Vim uses its own dialect of regexes. See :help regexp for detailed information that should answer your question and then some. (Note, your question is too "fuzzy", and so I won't even try to give a full answer.) – Karl Yngve Lervåg Feb 18 at 7:47
  • Welcome to our site @MadScientists! For know your question is pretty unclear and I'm not sure someone can answer it. I think you should read the help as Karl suggested and also have a look at this question which could be useful to you. Then please edit your question so that it is easier to understand what you are looking for. – statox Feb 18 at 8:53
  • As Karl mentions Vim has it's own dialect. It almost surely evolved from BRE/ERE, though, by way of "traditional" vi given the BRE/ERE bits that remain today and based on some evidence that I mention in my answer to a question on this site: Traditional vi and it's regular expressions. All that said I'm not sure whether I'm actually addressing any of your question or not! It needs clarifying as other mentioned. – B Layer Feb 18 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.