|
| |||||||||||||||||||
See also: get_string_segments
| Parameter key | Default value | Type |
| _subject | false |
| Parameter key | Default value | Type |
| a_string | req | string |
| Parameter key | Default value | Type |
| returns | "first" | type.<one_of "first" "last" "all"/> |
"pre".<join prefix.<to_uppercase/> "post"/>
is executed in an environment with the local variable prefix
having the value of "a" for the first match of the pattern and "b" for the
second match of the pattern.
So for the first match, the code returns "preApost" and for the seond match it
returns "preBpost".
These computed strings replace the substring that was matched,
so the output string, "frontpreApostmiddlepreBpostend" is the
same as the input string except that
"azzz" has been replaced with "preApost" and
"bzzz" has been replaced with "preBpost".
<pattern pattern.<named "prefix" pattern.<one_of "a" "b"/>/> "zzz"/>.
<replace_string_segments "frontazzzmiddlebzzzend" returns="all">
"pre".<join prefix.<to_uppercase/> "post"/>
</>![]() | "frontpreApostmiddlepreBpostend" |
© Copyright 2007 Clear Methods, Inc.