The following prints the entire content of the line after "B. "
perl -ne'print if /B[.] (.*)/s' $string > file
B. some text here
A regex with a leading carat indicates that the expression should match only if it is the first item on the line. The pattern
/^B[.] (.*)/s should get you the result you're looking for.