If a case-sensitive Match$ is found in MainStr$, EXTRACT$ gets all characters in MainStr$ up to the beginning of the first instance of Match$. The BCX EXTRACT$ function complements the REMAIN$ function.
Syntax:SubStr = EXTRACT$(MainStr AS STRING, Match AS STRING) Return Value:
Parameters: |
DIM SubStr$ SubStr$ = EXTRACT$("Filename.bas", ".bas") PRINT SubStr$
Filename
If a case-sensitive instance of any character in Match is found in MainStr, EXTRACTANY$ gets all characters in MainStr up to the beginning of the first instance of any character in Match.
Syntax:SubStr = EXTRACTANY$(MainStr AS STRING, Match AS STRING) Return Value:
Parameters: |
DIM SubStr$ SubStr$ = EXTRACTANY$("Bond, James Bond", " ,") PRINT SubStr$ SubStr$ = EXTRACTANY$(SubStr$, " ,") PRINT SubStr$
Bond Bond
If a case-sensitive Match$ is found in MainStr$, REMAIN$ gets all characters in MainStr$ from the end of the first instance of Match$. The BCX REMAIN$ function complements the EXTRACT$ function
Syntax:SubStr = REMAIN$(MainStr AS STRING, Match AS STRING) Return Value:
Parameters: |
DIM SubStr$ SubStr$ = REMAIN$("Filename.bas", "name") PRINT SubStr$
.bas