options:xml:search-regexp-not-dot-newline

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
options:xml:search-regexp-not-dot-newline [2014/10/14 00:00] adminoptions:xml:search-regexp-not-dot-newline [2018/01/10 20:41] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Regular Expression Search: Dot Not Match Newline ====== ====== Regular Expression Search: Dot Not Match Newline ======
  
-By default search regular expression used in HippoEDIT ([[http://www.boost.org/doc/libs/1_53_0/libs/regex/doc/html/boost_regex/ref/match_flag_type.html|BOOST Regexp]]) interpret "." symbol in expression as ANY symbol. Including newline character. So that can happen that search with your [[http://en.wikipedia.org/wiki/Regular_expression|greedy regular expression]] will take too long (fex //a.*b// ), while it analyzes whole text , from first "a" till document end. +By default search regular expression used in HippoEDIT ([[http://www.boost.org/doc/libs/1_53_0/libs/regex/doc/html/boost_regex/ref/match_flag_type.html|BOOST Regexp]]) interpret "." symbol in expression as ANY symbol. Including newline character. So that can happen that search with your [[http://en.wikipedia.org/wiki/Regular_expression|greedy regular expression]] will take too long (for example, //a.*b// ), while it analyzes whole text, from first "a" until document end. 
  
-There is two ways to solve that: change your expression to non greedy form (that is probably what you want), as fex: //a.*?b// or you can force HippoEDIT to always search within line, if "." is used ("." do not match newline symbol). +There are two ways to solve that: change your expression to nongreedy form (that is probably what you want), as for example: //a.*?b// or you can force HippoEDIT to always search within line, if "." is used ("." do not match newline symbol). 
  
 Default behavior of for processing "." character in HippoEDIT search engine can be controlled by following XML flag in **settings.xml**: Default behavior of for processing "." character in HippoEDIT search engine can be controlled by following XML flag in **settings.xml**:
Line 15: Line 15:
 <note>The feature available from HippoEDIT 1.51.35</note> <note>The feature available from HippoEDIT 1.51.35</note>
  
-#xml_option #performance #1.51+#xml_option #performance #1_51