Y
Y
ywitodenasuby2018-11-08 02:33:21
Java
ywitodenasuby, 2018-11-08 02:33:21

How to pull out a regex?

There is an html page where I want to pull out the number 11.

type="hidden" 
  name="data[map_zoom]"
  value="11" />
<input

Tried like this but nothing works
Pattern pMapZoom = Pattern.compile("name=\"data\\[map_zoom\\]\"\\r\\n\\tvalue=\"(.*?)\"");

And as I have not twisted the regular season, nothing comes out. Help, who understands.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
aol-nnov, 2018-11-08
@aol-nnov

jsoup

A
Alexander Borisovich, 2018-11-08
@Alexufo

you can't use xpath? in xml it is not quite correct to use regular expressions.
/hidden(.*?)value="(.*)?"/s

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question