Hi, I need help creating or manipulationg my current regex that will grab two numbers from a line, while excluding a specific number. Here is an example of what the line will look like:
"In our tests, downloads on port 6881 achieved up to 12059 Kbps while downloads on port 47649 achieved up to 9623 Kbps."
My regular expression is this: Pattern pattern = Pattern.compile("^In our tests, downloads on port 6881\D+(\d+)\D+(\d+)"); . So I need help with a regex that will grab the 12059 number and the 9623 number, and exclude 47649. In my program the numbers 6881 and 47649 will always be the same. The 12059 and 9623 numbers will change depending on the file being read.
Any and all help is extremly appreciated. If you need me to give any more information or explanation let me know.