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
In reply to Perl regex match by Eshan_k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |