RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
(?i:)(?<=\.)\D\D(?:-\D{2,3}?(?:-\D\D\D\D)?)?(?=.resx) #Just change the extension if you want to take a Culture out of different type of file name. #The result will always be of the format: #(2CharacterLanguage)-(2or3CharacterLocale)-(4CharacterScript) #where the second or third set are optional #this matches the format of the CultureInfo object in Microsoft .NET
Description
This expression pulls the Culture name out of a .resx file name.
Matches
blah.is.en.resx | something.zh-CHS.resx | something.uz-UZ-Cyrl.resx
Non-Matches
blah.is.eee.resx | something.zh-X.resx | something.uz-UZ-Uz.resx
Author Rating: Not yet rated. Eric Falsken
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials