Y
Y
ywitodenasuby2018-11-18 01:59:22
Java
ywitodenasuby, 2018-11-18 01:59:22

How to compose a regular expression in Java?

Unable to retrieve values. Help, please, who understands.
Search text:

<div class="suggesttext tleft">
                                                                                                                                                    <a href="#" class="link clearPhoneViews"
                                                       data-token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhZElEIjoiNDU4MTI0NjQ2IiwiZXhwIjoxNTQyNDkxMzAxfQ.sJsVtqm9KyUWXlKHmaTtz43rQzWeVH0ZQSpe8NVpj7A"
                                                       data-ad-id="458124646">
                                                        <span>Обнулить</span>

5bf09d166e362694172891.png
I tried this regex
data-token=\"(.*?)\"\n                                                       data-ad-id=\"(.*?)\"

But it doesn't work(

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-11-18
@ywitodenasuby

data-.*=\"(.*)\"
https://ideone.com/swMkeU

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question