Java Pattern splitAsStream(CharSequence input) MethodThe splitAsStream method of Pattern class returns a stream of String whose elements match the pattern. This method matches the pattern against the input sequence and returns the stream. If this pattern does not match any subsequence of the input, then the resulting stream has just one element, namely the input sequence in string form. Syntax:Parameter:The stream of strings computed by splitting the input around matches of this pattern Since:1.8 Example 1Test it NowOutput: java php asp Example 2Test it NowOutput: javat*po [email protected] - [[email protected]] Example 3Test it NowOutput: aa1bb3cc4dd4ee-[aa!bb!cc!dd!ee] a5b5c5d5-[a!b!c!d]
Next TopicJava Regex
|