src/Utility/Text.php
public function readWithPattern($text, $pattern) {
		$pieces = explode("\n", $text);
		$result = [];
		foreach ($pieces as $piece) {
			$result[] = sscanf(trim($piece, "\r\n"), $pattern);
		}
		return $result;
	}
public function readWithPattern($text, $pattern) {
		$pieces = explode("\n", $text);
		$result = [];
		foreach ($pieces as $piece) {
			$result[] = sscanf(trim($piece, "\r\n"), $pattern);
		}
		return $result;
	}
public function readWithPattern ( $ text , $ pattern ) { $ pieces = explode ( "\n" , $ text ) ; $ result = [ ] ; foreach ( $ pieces as $ piece ) { $ result [ ] = sscanf ( trim ( $ piece , "\r\n" ) , $ pattern ) ; } return $ result ; }
Read with a specific pattern.

E.g.: '%s,%s,%s'

@param string $text
@param string $pattern
@return array
Read with a specific pattern .