textafter(
TEXT
,
TAG
)
The textafter( function extracts the text after the tag.
Parameters
This function has two parameters:
text – the original text
tag – the separator character (or characters).
Description
This function extracts the text that appears after a specified tag. The tag many be one or more characters long. If the tag doesn’t occur in the text then the entire original string is returned.
textafter("someone@anisp.net","@") ☞ anisp.net
To extract text before a tag, use the textbefore( function.
Note: This function is equivalent to:
?(thetext contains thetag,thetext[length(thetag)+search(thetext,thetag),-1],thetext)
See Also
- after( -- extracts all text after a specified tag (sequence of characters).
- before( -- extracts all text before a specified tag (sequence of characters). If the tag doesn't exist the function returns "".
- extract( -- extracts a single data item from a text array, and can also be used to count the number of items in the array.
- firstline( -- extracts the first line from the text.
- firstword( -- extracts the first word from the text.
- lastline( -- extracts the last line from the text.
- lastword( -- extracts the last word from the text.
- left( -- extracts characters from the left edge of the text.
- nthline( -- extracts the nth line from the text.
- nthword( -- extracts a word from the middle of the text.
- randomline( -- returns a random line from multiple lines of text.
- randomword( -- returns a random word from a list of words.
- right( -- extracts characters from the right edge of the text.
- textbefore( -- extracts the text before the tag.
- trim( -- removes characters from the right edge of the text.
- trimleft( -- removes one or more characters from the left edge of the text.
History
10.0 | No Change | Carried over from Panorama 6.0. |