@NonNull
    public CacheArtefactParser parse(@Nullable final String text) {
        waypoints.clear();
        variables.clear();

        if (text != null) {
            //if a backup is found, we parse it first
            for (final String backup : TextUtils.getAll(text, BACKUP_TAG_OPEN, BACKUP_TAG_CLOSE)) {
                parseWaypointsFromString(backup);
                parseVariablesFromString(backup, true);
            }
            final String remainder = TextUtils.replaceAll(text, BACKUP_TAG_OPEN, BACKUP_TAG_CLOSE, "");
            parseWaypointsFromString(remainder);
            parseVariablesFromString(remainder, false);
        }

        return this;
    }
Parses given text for cache artefacts and stores them internally.
Works by rule of thumb.

@param text Text to parse for waypoints
@return a collection of found waypoints
main/src/main/java/cgeo/geocaching/models/CacheArtefactParser.java