Advertisement
Guest User

trying to read from file into a string

a guest
Jan 19th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.24 KB | None | 0 0
  1. import 'dart:io';
  2. import 'dart:async';
  3.  
  4. void main() {
  5.   String f = new File("/home/hayden/journal.txt")..readAsString();
  6.   RegExp wordSplit = new RegExp(r"(\w+)");
  7.   Iterable<Match> words = wordSplit.allMatches(f);
  8.   print(words);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement