![](/uploads/1/2/5/8/125847109/658213165.jpg)
I got these error message when tried to run the reports from the server. Does anyone knows why is this happens and how to solve it.I just upgrade.
I am trying to extract the value of version from
Accept
header which can be of the formThunderbolt vs usb-c cable. here is my code for extracting the version
When I am invoking the above function which is intended to extract version (for example can be of the form v1.0 or v1.5 or v2.5)
I get following exception:
I think I am doing something wrong in my regex or the input string has some illegal charecters which I am not able to identify with my limited knowledge of Regular expression. Help me find out the reason.
Vaibhav RajVaibhav Raj
4 Answers
It'd advise against (ab)using look-behind, if it is possible to write one without that is clear and does the same thing.
Just use the pattern:
And what you want will be in capturing group 1.
nhahtdhnhahtdh
The code is using lookbehind assertion:
That is not captured as a group. If you want capture
version=
as a group, use capturing group:To get
1.1
from the given string input, use following regular expression:falsetrufalsetru
Surround the part you want to capture with parentheses to create a group (Actually, this is optional in your case since you want the entire matching area):
Then use
matcher.group()
(with no parameter) to return 1.1
for your example input.Note that you must call
matcher.find()
before using matcher.group()
.matcher.group(x)
will only work if your regexp matches the entire input string.Alex WittigAlex Wittig
This is the code u r looking for..
void versionFinder() {
}
Patchcontent (or the ContentPatch folder) is NOT where it is supposed to go.Mods should be a folder in the same Sims 3 directory where you see your Library and your Saves. Nraas master controller 1.63 download. It is not one that ships with the game; you make it yourself.Packages is a folder that goes in the Mods folder. (Also one that doesn't ship with the game.)Resource.cfg is a file which goes inside the Mods folder along with the Packages folder, and tells the game what to do with this stuff.Master Controller goes in Packages.
![Java.lang.indexoutofboundsexception: Java.lang.indexoutofboundsexception:](/uploads/1/2/5/8/125847109/167876387.png)
You can change the regex after d as per ur need.
dukemalikdukemalik
Not the answer you're looking for? Browse other questions tagged javaregexscala or ask your own question.
![](/uploads/1/2/5/8/125847109/658213165.jpg)