Added note that in_context is slow

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1195 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-09-03 14:39:00 +00:00
parent 7e3f9cccdc
commit 9c9a2aec61
+3
View File
@@ -15,6 +15,9 @@ When the @replace@ is used many times with the same @match@ or @in_context@ valu
> my_replace("input") # called many times > my_replace("input") # called many times
This way the regular expression is compiled only once. This way the regular expression is compiled only once.
Note: Avoid using @in_context@, since it is quite slow.
Consider using lookahead and lookbehind assertions first if possible.
--Parameters-- --Parameters--
! Parameter Type Description ! Parameter Type Description
| @input@ [[type:string]] String to replace in. | @input@ [[type:string]] String to replace in.