ZeroBased_IX
ZeroBased_IX

Reputation: 2727

Specific word followed by full stop followed by another group RegEx

Hi I'm having a little trouble with a regular expression.

I tested: ([Version]+)\.([.0-9A-Za-z]+) With:

/Downloads/Documents/Access MDB - DEV Version.2.1.4.zip

This worked in RegexHero, my groups seemed fine (sort of).

However when I'm searching through HTML source code it returns things like:

e.axd

How would I get 2 groups:

  1. Version.

  2. 2.1.4.zip

Or even one group?

  1. Version.2.1.4.zip

I'm puzzling over this, regular expressions aren't my strong suit.

Upvotes: 0

Views: 74

Answers (2)

ZeroBased_IX
ZeroBased_IX

Reputation: 2727

After using Avinash's answer as a baseline I found the solution as:

(version.*\.zip)

This matches what I needed

version.2.1.4.zip

Upvotes: 0

Avinash Raj
Avinash Raj

Reputation: 174786

Version.2.1.4.zip in one group,

^.* (.*)$

DEMO

Upvotes: 1

Related Questions