I have the following string "*&abc=123&**&defg=hh&*" and so on the pattern start and end is && and I would like to have the following when I do regex.matches or regex.split
first match = &abc=123& 2 match = &defg=hh&
appreciate any help
I have the following string "*&abc=123&**&defg=hh&*" and so on the pattern start and end is && and I would like to have the following when I do regex.matches or regex.split
first match = &abc=123& 2 match = &defg=hh&
appreciate any help
&[0-9a-zA-Z]+=[0-9a-zA-Z]+&
You may need to change the [0-9a-zA-Z] depending on what characters you want to allow.
& matches the characters & literally
[0-9a-zA-Z]+ match a single character present in the list below
Quantifier: + Between one and unlimited times, as many times as possible, giving back as needed [greedy]
0-9 a single character in the range between 0 and 9
a-z a single character in the range between a and z (case sensitive)
A-Z a single character in the range between A and Z (case sensitive)
= matches the character = literally
[0-9a-zA-Z]+ match a single character present in the list below
Quantifier: + Between one and unlimited times, as many times as possible, giving back as needed [greedy]
0-9 a single character in the range between 0 and 9
a-z a single character in the range between a and z (case sensitive)
A-Z a single character in the range between A and Z (case sensitive)
& matches the characters & literally