Detailed explanation of the "$" symbol in java: (Recommended: java video tutorial)
How to write regular expressions in java, let’s briefly talk about it below Let’s look at:
1, ^ and $ are used to match the beginning and end of the string respectively
2, "^abc$": are the characters that are required to start with abc and end with abc String, actually only abc matches.
3. The \\n$ above is matched by newline.
In the batch command findstr:
$ represents the end of the line, and "step$" only matches the last word in "hello world step".
For more java knowledge, please pay attention to the java basic tutorial column.
The above is the detailed content of What does the '$' symbol mean in java. For more information, please follow other related articles on the PHP Chinese website!