how to write a pattern for matching the following line
print "hello world1" .
Printable View
how to write a pattern for matching the following line
print "hello world1" .
I recommend you check out the API for the Pattern class.
If you want an exact match on that line as a String, the equals() method would do it:
aString.equals("print \"hello world1\" .")
ok. thank you.