Hi
name=" sg:cf:b"\s+checked="checked"\s+value="([^"]+)" should work - The
reason you have to add the name is because there are likely other html
elements. Its upto you if you want to retain the checked part (will break
whenever your html changes slightly) v/s a more generic .+? which is
inefficient. If you are willing to give up some efficiency and memory ,the
XPath selectors usually work better for HTML elements (in the sense of
easier to read and logical in how they deal with attributes)

Your original expression had   /> which is not in your text , so it would
not have worked (As well as you are likely to have matched some other value.


regards
deepak

On Mon, Sep 17, 2018 at 10:05 AM Puneet Varma <nress.pva...@gmail.com>
wrote:

> Thanks for the response. Below is what I have for the checkbox.
>
>
> <input id="sg:cf:b:0" type="checkbox" name="sg:cf:b" checked="checked"
> value="2C94854D656354990165E824FA460175" int-ns-multiple="sgcfb">
>
> On Mon, Sep 17, 2018 at 12:50 PM Deepak Shetty <shet...@gmail.com> wrote:
>
> > Hi
> > you havent posted the text you are matching against so cant say why your
> > regex isnt working
> > Generally expressions like the above fail because . You have whitespace ,
> > or you are using a single quote or there is something between value and
> the
> > end of your tag like a css class and so on. Check the text of the
> response
> > and ensure that your regex is a child of the sampler returning the
> response
> >
> > regards
> > deepak
> >
> > On Mon, Sep 17, 2018 at 8:34 AM Puneet Varma <nress.pva...@gmail.com>
> > wrote:
> >
> > > I have used the following regular expression for the value
> > > 2C94854D656354990165E824FA460175  with the regular expression
> > > value="(.+?)" />
> > >
> > > it is not working.  it is a check box, Id changes every time I am
> running
> > > it.
> > >
> > > Any help is greatly appreciate it.
> > >
> >
>

Reply via email to