Article 6JCKA How to grep on grep with regex? How to match only numbers and dots from a grep?

How to grep on grep with regex? How to match only numbers and dots from a grep?

by
debianfella
from LinuxQuestions.org on (#6JCKA)
Code:curl -s https://packagist.org/packages/drupal/core | grep -oP '<span class="version-number">'.*Quote:
<span class="version-number">10.2.2</span>
How to take only the 10.2.2 from this?

This command failed (no output is given):

Code:curl -s https://packagist.org/packages/drupal/core | grep -oP '<span class="version-number">'.* | grep -oP '^\d+(\.\d+)*$'How to grep on grep with regex? How to match only numbers and dots from a grep?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments