The oxy_replace function is used to replace a string of
text.
The oxy_replace() function has two signatures:
-
oxy_replace
(
text
,
target
,
replacement
)
This function replaces each substring of the text that matches the literal target string
with the specified literal replacement string.
- text
- The text in which the replace will occur.
- target
- The target string to be replaced.
- replacement
- The string replacement.
-
oxy_replace
(
text
,
target
,
replacement
,
isRegExp
)
This function replaces each substring of the text that matches the target string with the
specified replacement string.
-
text
- The text in which the replace will occur.
-
target
- The target string to be replaced.
-
replacement
- The string replacement.
-
isRegExp
- If true the target and replacement arguments are considered regular
expressions, if false they are considered literal strings.
If you have image references but you want to see in the visual
Author editing mode thumbnail images which reside in the same
folder:
image[href]{
content:oxy_url(oxy_base-uri(), oxy_replace(attr(href), '.jpeg', 'Thumbnail.jpeg'));
}