I need to extract a sequence of coma separated numbers after specific substring. When the substring is in the beginning of the string it works fine, but not when its in the middle.
The regex 'Port':\ .([0-9]+)
works fine with the example below to get the value 2
.
String example:
{'Port': '2', 'Array': '[0, 0]', 'Field': '[2,2]', 'foo': '[0, 0]' , 'bar': '[9, 9]'}
But i need to get Field value, I dont care if its '[2,2]' or 2,2 (string or number)
I tried various attempts with regex calculator, but couldnt find a solution to return the value after string in middle of the text. Any ideas? Please help. Thanks ahead, Nir
source https://stackoverflow.com/questions/74632019/comma-separated-number-after-specific-substring-in-middle-of-string
Comments
Post a Comment