I have the following data line:
oauthscope: command_path.use
Trying to create a RegEx expression that will retrieve just command_path.use
I've tried this, but it's selecting the opposite of what I want:
^oauthscope: (.*?)
My java code looks like this:
Pattern pattern = Pattern.compile("^oauthscope: (.*?)");
String mydata = "oauthscope: command_path.use";
Matcher matcher = pattern.matcher(mydata);
if(matcher.find()) {
System.out.println("I found: '" + matcher.group(1) + "'");
} else {
System.out.println("No match found!");
}
The result I get is this:
I found: ''
- I don't know how to tell it to fetch everything starting with that pattern to the end of the line.