我需要使用正则表达式提取非英语单词。我使用以下代码作为模式 提取那些非英语单词,但我不能这样做..
static void Main(string[] args)
{
//Declaring variables for use later
List<string> directories = new List<string>();
List<FileInfo> fileList = new List<FileInfo>();
//Load Directories from XML
XElement Options = XElement.Load("C:/Directories.xml");
IEnumerable<XElement> DirList =
from dir in Options.Descendants("Directory")
select dir;
foreach (XElement dirName in DirList)
{
directories.Add((string)dirName);
}
//Converting XML strings to Directories and adding all subfolders over 30 seconds old to a delete list
foreach (var directory in directories)
{
DirectoryInfo dirItem = new DirectoryInfo(directory);
var folderList = dirItem.GetDirectories();
Console.WriteLine(folderList);
}
}
这是来源
refid=27">[\w\s]+
使用以下模式我可以正确地提取英语单词而非非英语单词..任何人都可以建议我这样做的方法..我想通过REGEX这样做 感谢