Skip to main content

StringExtract

StringExtract["string",n] extracts the nth block of characters in string, where blocks of characters are defined as delimited by whitespace.

StringExtract["string",{pos1,pos2,…}] extracts blocks at several positions in string.

StringExtract["string",sep->pos] takes blocks to be delimited by separators that match sep.

StringExtract["string",pos1,pos2,…] extracts blocks at positions posi, delimiting with whitespace for the lowest level, newlines for the next level, and a successively increasing number of newlines thereafter.

StringExtract["string",sep1->pos1,sep2->pos2,…] gives a nested list of blocks, with the sepi used as separators for successive levels.

Please visit the official Wolfram Language Reference for more details and examples on core symbols.