Eshan_k has asked for the wisdom of the Perl Monks concerning the following question:
I want to match only words like "abcunit", "hedhdunit", "ewedfunit" and get into array from a text file using regex. Can any one please tell how can I get only that word in line. So for I am using /(....unit)/g but the charcters before "unit" are varying. Can any one please tell perfect regex for this. Any help will be greatly appreciated.
unit : abcunit unit : hedhdunit unit : ewedfunit unit : eedunit
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl regex match
by LanX (Saint) on Feb 11, 2015 at 03:22 UTC | |
|
Re: Perl regex match
by manoj_speed (Prior) on Feb 11, 2015 at 07:14 UTC | |
|
Re: Perl regex match
by Discipulus (Canon) on Feb 11, 2015 at 09:42 UTC | |
|
Re: Perl regex match
by Anonymous Monk on Feb 11, 2015 at 03:19 UTC |