string - Are there particular cases where native text manipulation is more desirable than regex? -


Is there a specific case where the original text manipulation is more desirable than regex? Particularly pure?

Note: Regex appears to be an extremely emotional subject, so I'm upset to ask such a question. This question is not inviting personal / business ideas on regex , the form of solution language basic commands (including the use of the underlying code using regex) in the specific circumstances only, including its use And why not. / P>

Also, keep in mind that desirable means can be demonstrated, this can mean code-readability; This does not mean, because there are advantages and limitations for each solution to a problem.

If this is a duplicate, then I have searched SO for a similar question.

when you can simply with the original text manipulation Usually better (easy to read and better to perform) not to use Regex.

Personal rule of thumb: If it is difficult or it is lengthy to "manual" and the performance advantage is negligible, then not. Others do it.

Do not Examine:

  • Split
  • Simple Search & amp;
  • Long text
  • Loop
  • Existing Basic Functions (e.g., in PHP, strrchr , eKeyword ...)

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -