R
R
rowd2022-03-27 21:26:28
Regular Expressions
rowd, 2022-03-27 21:26:28

How to rip out an attribute using a regular expression?

There are a bunch of links with attributes, I need to rip out the title attribute. I didn’t work much with regular expressions, I only googled it.
(?<=\btitle=")[^"]*
But in this way I delete the contents of the attribute, but I need to somehow invert the work of this expression. Help brotherly please.

At the entrance

<a href="/prod-1" class="catalog_item_name" data-entity="product-title" title="Professional" data-category="id1">Товар 1</a>


At the exit, you need only
Professional

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SOTVM, 2022-03-28
@sotvm

+ one more time also. from the torn
one, you didn’t say which language

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question