Commit acb39222 authored by Geoff Simmons's avatar Geoff Simmons

Add an example to the .cost() documentation.

parent 12719aa3
...@@ -624,6 +624,10 @@ meaningful relative to one another -- more complex regexen have a ...@@ -624,6 +624,10 @@ meaningful relative to one another -- more complex regexen have a
higher cost than less complex regexen. This may be useful during higher cost than less complex regexen. This may be useful during
development and optimization of regular expressions. development and optimization of regular expressions.
Example::
std.log("r1 cost=" + r1.cost() + " r_alt cost=" + r_alt.cost());
regex functional interface regex functional interface
========================== ==========================
......
...@@ -534,6 +534,10 @@ meaningful relative to one another -- more complex regexen have a ...@@ -534,6 +534,10 @@ meaningful relative to one another -- more complex regexen have a
higher cost than less complex regexen. This may be useful during higher cost than less complex regexen. This may be useful during
development and optimization of regular expressions. development and optimization of regular expressions.
Example::
std.log("r1 cost=" + r1.cost() + " r_alt cost=" + r_alt.cost());
regex functional interface regex functional interface
========================== ==========================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment