I have a large text file in which I need to find the words containing only unique letters(a-z,A-Z). The words should not contain any character other than letters. Also, it needs to be case-insensitive so that words like alphA, morNing are not matched.
Examples:
marco - Should match(because of unique letters)
asia - Should Not Match(contains 2 'a')
asiA - Should Not Match(as it has 'a' and 'A')
alpha - Should not match
mike - Should match
roger - Should not match
abascus - Should not match
mach1 - Should not match(because of presence of 1)
Sample text from file against which I need to test:
The shares together form stock.The stock of a corporation is partitioned into shares, the total of which are stated at the time of business formation. Additional shares may subsequently be authorized by the existing shareholders and issued by the company. In some jurisdictions, each share of stock has a certain declared par value, which is a nominal accounting value used to represent the equity on the balance sheet of the corporation. In other jurisdictions, however, shares of stock may be issued without associated par value.
Shares represent a fraction of ownership in a business. A business may declare different types (or classes) of shares, each having distinctive ownership rules, privileges, or share values. Ownership of shares may be documented by issuance of a stock certificate. A stock certificate is a legal document that specifies the number of shares owned by the shareholder, and other specifics of the shares, such as the par value, if any, or the class of the shares.
In the United Kingdom, Republic of Ireland, South Africa, and Australia, stock can also refer to completely different financial instruments such as government bonds or, less commonly, to all kinds of marketable securities.
My attempt:
\b(?![^a-zA-Z]+)(?!(?:[a-zA-Z]*([a-zA-Z]))*\1)[a-zA-Z]+\b
but it is not able to match anything here.
I have been stuck here for quite sometime. Please point me in right direction. Thanks
