1

Kimono Labs uses this for their basic regex expression: /^()(.*?)()$/.

The documentation claims the first bracket holds the text before the beginning of the captured expression, the middle bracket holds the captured expression, and the end bracket holds the text preceding the captured expression.

I have the url of a number of images I want to capture with junk at the end of them like this: https://awebsite/witha/picture.jpg?w=800 which I want to pair back to get rid this: ?w=800

Nothing I do to the regex seems to make a difference, I can't find much discussion of the kimonolabs regex online, and I'd love to be able to make it work well.

kjhughes
  • 106,133
  • 27
  • 181
  • 240
GBin
  • 31
  • 7
  • I'm not at all familiar with kimono, but by the sounds of it, `/^()(.*?)(\?.*)$/` ought to work. – Steven Doggart Jul 25 '15 at 01:25
  • Looks good but nothing changes when I put it into the regex. The thing is I can't change anything about it the captured URL. – GBin Jul 25 '15 at 08:19
  • I had one idea.. On the Kimono interface there is an input for the Xpath, one for the Regex, then a choice of attributes - such as 'src' 'href' 'title' 'text content' - which are selected by radio button, could it be that selecting a radio button overwrites the regex? – GBin Jul 25 '15 at 08:30

0 Answers0