首页 \ 问答 \ 用/斜线分割数组(Splitting the array with / slash)

用/斜线分割数组(Splitting the array with / slash)

从我的数组中的调试器我得到这个


“/ mercedes-benz / 190-class / 1993 /”class =“canonicalLink”data-qstring =“?sub = sedan”> 1993

我希望在每个'/'后面分割文本并将其用字符串[]取出,这是我的努力

Queue<string> see = new Queue<string>(); //char[] a = {'\n '};
       List<car_facts> car_fact_list = new List<car_facts>();
       string[] car_detail;
       foreach (string s in car)
       {

           MatchCollection match = Regex.Matches(s, @"<a href=(.+?)</a>",
            RegexOptions.IgnoreCase);

            // Here we check the Match instance.
            foreach(Match mm in match)
            {
                // Finally, we get the Group value and display it.
                string key = mm.Groups[1].Value;
                //key.TrimStart('"');
                //key.Trim('"');
                key.Trim();

                **car_detail = Regex.Split(key, "//");**//I tried with strin.Split as well and tried many combination of seperator ,

                see.Enqueue(key);
            }

}

在car_detail [0]中,我得到这个“$ [link]”> $ [title]

从这个字符串 “/ mercedes-benz / 190-class / 1993 /”class =“canonicalLink”data-qstring =“?sub = sedan”> 1993


from debugger in my string of arrays I am getting this


"/mercedes-benz/190-class/1993/" class="canonicalLink" data-qstring="?sub=sedan">1993

I wish to split text after each '/' and get it in string[] ,here is my effort

Queue<string> see = new Queue<string>(); //char[] a = {'\n '};
       List<car_facts> car_fact_list = new List<car_facts>();
       string[] car_detail;
       foreach (string s in car)
       {

           MatchCollection match = Regex.Matches(s, @"<a href=(.+?)</a>",
            RegexOptions.IgnoreCase);

            // Here we check the Match instance.
            foreach(Match mm in match)
            {
                // Finally, we get the Group value and display it.
                string key = mm.Groups[1].Value;
                //key.TrimStart('"');
                //key.Trim('"');
                key.Trim();

                **car_detail = Regex.Split(key, "//");**//I tried with strin.Split as well and tried many combination of seperator ,

                see.Enqueue(key);
            }

}

In car_detail[0] I get this "$[link]">$[title]

from this string "/mercedes-benz/190-class/1993/" class="canonicalLink" data-qstring="?sub=sedan">1993


原文:https://stackoverflow.com/questions/9673817
更新时间:2023-12-18 15:12

最满意答案

为清楚起见,FILE.ReceivedFileName与Pipeline或其任何组件无关。 提升与否也无所谓。

FILE.ReceivedFileName仅由FILE或FTP适配器开箱即用。

如果要在业务流程中复制消息,则还必须在出站消息上手动复制(设置)FILE.ReceivedFileName。


For clarity, FILE.ReceivedFileName has nothing to do with the Pipeline or any of it's components. Promoted or not also does not matter.

FILE.ReceivedFileName is only set, out of the box, by the FILE or FTP Adapter.

If you are copying the Message in the Orchestration, you must also manually copy (set) FILE.ReceivedFileName on the outbound Message.

相关问答

更多
  • 编辑架构以将OrchestrationID字段从Record更改为Field Element。 只能区分元素和属性。 这通常需要删除现有的Record元素,然后重新创建一个具有相同名称的Element,因为Visual Studio不允许更改xml节点的类型。 但是,您可以通过使用“打开方式...”选项使用XML(文本)编辑器打开xsd文件来解决此问题。 Edit your schema to change the OrchestrationID field from a Record to a Field ...
  • 为清楚起见,FILE.ReceivedFileName与Pipeline或其任何组件无关。 提升与否也无所谓。 FILE.ReceivedFileName仅由FILE或FTP适配器开箱即用。 如果要在业务流程中复制消息,则还必须在出站消息上手动复制(设置)FILE.ReceivedFileName。 For clarity, FILE.ReceivedFileName has nothing to do with the Pipeline or any of it's components. Promote ...
  • 你现在甚至不用再合成iVars了。 最新的Xcode将自动为每个属性创建一个支持实例变量,其属性名称以下划线为前缀。 You now don't even have to synthesize the iVars anymore. The latest Xcode will automatically create a backing instance variable for each property, with the property name prefixed with an underscore ...
  • Product.Version将等于7.0,一旦在ant中设置了属性,它将不会被稍后在脚本中设置属性的另一次尝试覆盖。 Product.Version will be equal to 7.0, once a property is set within ant it will not be overwritten by another attempt to set the property later in the script.
  • 我想通了,但这不是我所说的直观的xml-parser库。 void parse_xml( boost::property_tree::iptree const& pt ) { BOOST_FOREACH(boost::property_tree::iptree::value_type const& v, pt.get_child("root.jar")) { // Show jar if ( boost::iequals( v.first, "
  • 以下代码适用,不使用BtsVariablePropertyMapping System.Diagnostics.EventLog.WriteEntry("ABC", Message_Datasheets(FILE.ReceivedFileName)); varNewSearchDataLoadURL = System.Configuration.ConfigurationManager.AppSettings["NewSearchDataLoadURL"]; varNewXmlMsg = new Sys ...
  • 因此,您的目标是使用动态端口调用Rest WebService,以便执行此操作 1 - 指定您的操作类型 2 - 创建并映射变量: “BtsVariablePropertyMapping”是一种功能强大的BizTalk技术,它允许您在网址中定义自定义变量,并使用其名称和命名空间将其映射到任何上 ...
  • 如果您想要在运行时计算资源文件的大小,基本上可以执行以下操作(省略错误检查等): // Get path for resource file NSString *resourcePath = [[NSBundle mainBundle] pathForResource:@"myPDFFile" ofType:@"pdf"]; // Get file attributes NSDictionary* attributeDict = [[NSFileManager defaultManager] attribu ...
  • config.properties不在classpath下。 它应该在classes文件夹下。 你也可以试试 Database.class.getClassLoader().getResourceAsStream( "com/lk/apiit/eduservice/config.properties"); 正如Roman C所指出的,您还需要首先初始化Properties Object Properties property = new Properties(); con ...
  • 如Objective-C功能可用性索引中所述 ,Xcode 4.4(LLVM编译器4.0)引入了属性实例变量的自动合成,并且需要现代运行时(iOS上的所有代码,OS X上的64位代码)。 所以,教程有点过时了,就是这样。 As noted in the Objective-C Feature Availability Index, automatic synthesis of property instance variables was introduced with Xcode 4.4 (LLVM Co ...

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)