Hi Asad, On Fri, 27 Jul 2018 18:24:39 +0530 Asad <asad.hasan2...@gmail.com> wrote:
> Hi All , > > I want to get a regex to actually get the rpm name and version for > comparison : > > > binutils-2.23.52.0.1-12.el7.x86_64", > compat-libcap1-1.10-3.el7.x86_64" > compat-libstdc++-33-3.2.3-71.el7.i686 > > (^[a-zA-Z0-9\-]*)\-\d' > > First part of the regular expression is ^[a-zA-Z0-9\-] > > which means search for anything that begins with a letter > > (lower or upper) or a number up until you reach an > > hyphen sign (‘-‘). > > but it fails to match > > compat-libstdc++-33-3.2.3-71.el7.i686 > > Please let me know what regex should i use to extract all 3 > > rpms. > > Also let me know if there are web tools to build regex > > Good websites for regex tutorials. > for that, see: * http://perl-begin.org/topics/regular-expressions/ * https://github.com/aloisdg/awesome-regex * https://www.regular-expressions.info/ > > > > Thanks, > > > > > -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ https://youtu.be/GoEn1YfYTBM - Tiffany Alvord - “Fall Together” C++ is complex, complexifying and complexified. (With apologies to the Oxford English Dictionary). — http://www.shlomifish.org/humour.html Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/