Nianios
Nianios

Reputation: 1436

Regex for Word.AnotherWord

In Vb.NET I want to check a string if it is something like:

package_name.Procedure_name or
PackageName.Procedure_Name_Something_Else or
package_name.ProcedureName

So I need something like: word.otherWord

My problem is that I have tried many regexs but I wasn't able to achieve my goal. The latest regex expression that I tried is : ([\w-@]+\.)+([\w-@]) which matches up to the first character after the dot. Can anyone show me a direction or a hint?

Upvotes: 0

Views: 26

Answers (1)

Anirudha
Anirudha

Reputation: 32827

your regex should be

[\w-@]+[.][\w-@]+

Upvotes: 1

Related Questions