字符串取出特定数值
在下列字符中取出 -------》 WO23080900320{
"ModuleId": "04454e78-32bf-47ad-aa5b-e4d6a2a3d1c1",
"ModuleName": "工单",
"FormId": null,
"FormName": null,
"ModuleData": "{\r\n \"Code\": \"WO23080900320\",\r\n \"OrderType\": \"1\",\r\n \"TechVersion\": \"100\",\r\n \"BillStat\": \"3\",\r\n \"RequireAmount\": \"4.767\",\r\n \"DeliverDate\": \"\",\r\n \"PlanBeginTime\": \"2023-08-22 23:56:00\",\r\n \"PlanEndTime\": \"2023-09-01 23:59:00\",\r\n \"GoodsDirections\": \"特变电工新疆电缆有限公司,客户要求8月15日交货;分段:630米+615米+672米+705米+570米*2+555米+450米;按工厂工艺Q/XL\",\r\n \"GoodsType\": \"0\",\r\n \"CraftType\": \"1\",\r\n \"SalesCode\": \"1223923080021\",\r\n \"OrderRowNo\": \"1.1\",\r\n \"GoodsLength\": \"\",\r\n \"Basic_CustomerCode\": \"10000128\",\r\n \"Criterion\": \"GB/T19666-2005,GB/T12706.3-2008\",\r\n \"Basic_RoutingCode\": \"Q/XL03.3.308-2022\",\r\n \"Basic_ItemCode\": \"630602100940011\",\r\n \"Basic_BomCode\": \"100\",\r\n \"UnitProdMainName\": \"km\",\r\n \"UnitProdAuxName\": \"km\",\r\n \"SegLength\": \".63*1+.615*1+.672*1+.705*1+.57*2+.555*1+.45*1\",\r\n \"OrgM_DeptCode\": \"B13\",\r\n \"OrderDescribe\": \"ZC-YJY63-26/35kV-1×400\",\r\n \"OrderPlanQty\": \"4.767\",\r\n \"OrderPlanAuxQty\": \"4.767\",\r\n \"WOR_LAST_UPDATE_DATE\": \"2023-08-09 20:56:34\",\r\n \"WO_LAST_UPDATE_DATE\": \"2023-08-09 20:56:34\",\r\n \"WDJ_LAST_UPDATE_DATE\": \"2023-08-09 20:56:47\",\r\n \"RecId\": \"WO23080900320_\",\r\n \"Mdfdt\": \"2023/8/9 20:56:47\"\r\n}",
"NeedUpdateFields": [
"Code",
"OrderType",
"TechVersion",
"BillStat",
"RequireAmount",
"DeliverDate",
"PlanBeginTime",
"PlanEndTime",
"GoodsDirections",
"GoodsType",
"CraftType",
"SalesCode",
"OrderRowNo",
"GoodsLength",
"Basic_CustomerCode",
"Criterion",
"Basic_RoutingCode",
"Basic_ItemCode",
"Basic_BomCode",
"UnitProdMainName",
"UnitProdAuxName",
"SegLength",
"OrgM_DeptCode",
"OrderDescribe",
"OrderPlanQty",
"OrderPlanAuxQty",
"WOR_LAST_UPDATE_DATE",
"WO_LAST_UPDATE_DATE",
"WDJ_LAST_UPDATE_DATE",
"RecId",
"Mdfdt",
"Basic_CustomerId"
],
"Details": [
{
"ModuleId": "aff6afd8-5480-42c0-85fb-dbd28e5b86ad",
"ModuleName": "工单工艺BOM",
"ModuleDatas": [
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"Basic_ItemCode\": \"10091238\",\r\n \"PlanAmount\": \"482.874695\",\r\n \"RealAmount\": \"\",\r\n \"Note\": \"\",\r\n \"PlanAuxAmount\": \"482.874695\",\r\n \"Order_WorkOrderLineRowNo\": \"10\",\r\n \"UnitBomMainName\": \"KG\",\r\n \"UnitBomAuxName\": \"KG\",\r\n \"REQ_LAST_UPDATE_DATE\": \"2023-08-09 20:56:47\",\r\n \"RecId\": \"WO23080900320_10_10091238_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"Basic_ItemCode\": \"10091212\",\r\n \"PlanAmount\": \"4894.084263\",\r\n \"RealAmount\": \"\",\r\n \"Note\": \"\",\r\n \"PlanAuxAmount\": \"4894.084263\",\r\n \"Order_WorkOrderLineRowNo\": \"10\",\r\n \"UnitBomMainName\": \"KG\",\r\n \"UnitBomAuxName\": \"KG\",\r\n \"REQ_LAST_UPDATE_DATE\": \"2023-08-09 20:56:47\",\r\n \"RecId\": \"WO23080900320_10_10091212_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"Basic_ItemCode\": \"10091462\",\r\n \"PlanAmount\": \"377.405201\",\r\n \"RealAmount\": \"\",\r\n \"Note\": \"\",\r\n \"PlanAuxAmount\": \"377.405201\",\r\n \"Order_WorkOrderLineRowNo\": \"10\",\r\n \"UnitBomMainName\": \"KG\",\r\n \"UnitBomAuxName\": \"KG\",\r\n \"REQ_LAST_UPDATE_DATE\": \"2023-08-09 20:56:47\",\r\n \"RecId\": \"WO23080900320_10_10091462_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"Basic_ItemCode\": \"8923110242\",\r\n \"PlanAmount\": \"4.790883\",\r\n \"RealAmount\": \"\",\r\n \"Note\": \"\",\r\n \"PlanAuxAmount\": \"16397.755244\",\r\n \"Order_WorkOrderLineRowNo\": \"10\",\r\n \"UnitBomMainName\": \"km\",\r\n \"UnitBomAuxName\": \"KG\",\r\n \"REQ_LAST_UPDATE_DATE\": \"2023-08-09 20:56:47\",\r\n \"RecId\": \"WO23080900320_10_8923110242_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"Basic_ItemCode\": \"10087389\",\r\n \"PlanAmount\": \"881.26957\",\r\n \"RealAmount\": \"\",\r\n \"Note\": \"\",\r\n \"PlanAuxAmount\": \"881.26957\",\r\n \"Order_WorkOrderLineRowNo\": \"20\",\r\n \"UnitBomMainName\": \"KG\",\r\n \"UnitBomAuxName\": \"KG\",\r\n \"REQ_LAST_UPDATE_DATE\": \"2023-08-09 20:56:47\",\r\n \"RecId\": \"WO23080900320_20_10087389_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"Basic_ItemCode\": \"10150297\",\r\n \"PlanAmount\": \"934.565774\",\r\n \"RealAmount\": \"\",\r\n \"Note\": \"\",\r\n \"PlanAuxAmount\": \"934.565774\",\r\n \"Order_WorkOrderLineRowNo\": \"30\",\r\n \"UnitBomMainName\": \"KG\",\r\n \"UnitBomAuxName\": \"KG\",\r\n \"REQ_LAST_UPDATE_DATE\": \"2023-08-09 20:56:47\",\r\n \"RecId\": \"WO23080900320_30_10150297_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"Basic_ItemCode\": \"10083910\",\r\n \"PlanAmount\": \"4074.341886\",\r\n \"RealAmount\": \"\",\r\n \"Note\": \"\",\r\n \"PlanAuxAmount\": \"4074.341886\",\r\n \"Order_WorkOrderLineRowNo\": \"40\",\r\n \"UnitBomMainName\": \"KG\",\r\n \"UnitBomAuxName\": \"KG\",\r\n \"REQ_LAST_UPDATE_DATE\": \"2023-08-09 20:56:47\",\r\n \"RecId\": \"WO23080900320_40_10083910_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"Basic_ItemCode\": \"10151935\",\r\n \"PlanAmount\": \"90.326927\",\r\n \"RealAmount\": \"\",\r\n \"Note\": \"\",\r\n \"PlanAuxAmount\": \"90.326927\",\r\n \"Order_WorkOrderLineRowNo\": \"40\",\r\n \"UnitBomMainName\": \"KG\",\r\n \"UnitBomAuxName\": \"KG\",\r\n \"REQ_LAST_UPDATE_DATE\": \"2023-08-09 20:56:47\",\r\n \"RecId\": \"WO23080900320_40_10151935_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"Basic_ItemCode\": \"10108905\",\r\n \"PlanAmount\": \"2852.415489\",\r\n \"RealAmount\": \"\",\r\n \"Note\": \"\",\r\n \"PlanAuxAmount\": \"2852.415489\",\r\n \"Order_WorkOrderLineRowNo\": \"50\",\r\n \"UnitBomMainName\": \"KG\",\r\n \"UnitBomAuxName\": \"KG\",\r\n \"REQ_LAST_UPDATE_DATE\": \"2023-08-09 20:56:47\",\r\n \"RecId\": \"WO23080900320_50_10108905_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}"
],
"DelKeys": null,
"NeedUpdateFields": null,
"LineDatas": null,
"EditIds": null,
"IsExtendEdit": false,
"IsPartialSave": false
},
{
"ModuleId": "d084421c-6b6c-4b6a-96ff-5c9a7e987ea7",
"ModuleName": "工单段长",
"ModuleDatas": [
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"FixedLengthRowNo\": \"491878\",\r\n \"SegmentLength\": \".63\",\r\n \"SegmentNumber\": \"1\",\r\n \"TestLineLength\": \"\",\r\n \"SampleLineLength\": \"\",\r\n \"StartLineLength\": \"\",\r\n \"Length\": \"\",\r\n \"DishQty\": \"1\",\r\n \"Basic_ItemCode\": \"10109033\",\r\n \"RecId\": \"WO23080900320_491878_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"FixedLengthRowNo\": \"491879\",\r\n \"SegmentLength\": \".615\",\r\n \"SegmentNumber\": \"1\",\r\n \"TestLineLength\": \"\",\r\n \"SampleLineLength\": \"\",\r\n \"StartLineLength\": \"\",\r\n \"Length\": \"\",\r\n \"DishQty\": \"1\",\r\n \"Basic_ItemCode\": \"10109033\",\r\n \"RecId\": \"WO23080900320_491879_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"FixedLengthRowNo\": \"491880\",\r\n \"SegmentLength\": \".672\",\r\n \"SegmentNumber\": \"1\",\r\n \"TestLineLength\": \"\",\r\n \"SampleLineLength\": \"\",\r\n \"StartLineLength\": \"\",\r\n \"Length\": \"\",\r\n \"DishQty\": \"1\",\r\n \"Basic_ItemCode\": \"10109042\",\r\n \"RecId\": \"WO23080900320_491880_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"FixedLengthRowNo\": \"491881\",\r\n \"SegmentLength\": \".705\",\r\n \"SegmentNumber\": \"1\",\r\n \"TestLineLength\": \"\",\r\n \"SampleLineLength\": \"\",\r\n \"StartLineLength\": \"\",\r\n \"Length\": \"\",\r\n \"DishQty\": \"1\",\r\n \"Basic_ItemCode\": \"10109042\",\r\n \"RecId\": \"WO23080900320_491881_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"FixedLengthRowNo\": \"491882\",\r\n \"SegmentLength\": \".57\",\r\n \"SegmentNumber\": \"2\",\r\n \"TestLineLength\": \"\",\r\n \"SampleLineLength\": \"\",\r\n \"StartLineLength\": \"\",\r\n \"Length\": \"\",\r\n \"DishQty\": \"2\",\r\n \"Basic_ItemCode\": \"10087128\",\r\n \"RecId\": \"WO23080900320_491882_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"FixedLengthRowNo\": \"491883\",\r\n \"SegmentLength\": \".555\",\r\n \"SegmentNumber\": \"1\",\r\n \"TestLineLength\": \"\",\r\n \"SampleLineLength\": \"\",\r\n \"StartLineLength\": \"\",\r\n \"Length\": \"\",\r\n \"DishQty\": \"1\",\r\n \"Basic_ItemCode\": \"10087128\",\r\n \"RecId\": \"WO23080900320_491883_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"FixedLengthRowNo\": \"491884\",\r\n \"SegmentLength\": \".45\",\r\n \"SegmentNumber\": \"1\",\r\n \"TestLineLength\": \"\",\r\n \"SampleLineLength\": \"\",\r\n \"StartLineLength\": \"\",\r\n \"Length\": \"\",\r\n \"DishQty\": \"1\",\r\n \"Basic_ItemCode\": \"10087128\",\r\n \"RecId\": \"WO23080900320_491884_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:19\"\r\n}"
],
"DelKeys": null,
"NeedUpdateFields": null,
"LineDatas": null,
"EditIds": null,
"IsExtendEdit": false,
"IsPartialSave": false
},
{
"ModuleId": "894ecfb6-1901-4141-b76a-99526d7e1a0f",
"ModuleName": "工单工艺路线",
"ModuleDatas": [
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"RowNo\": \"10\",\r\n \"Basic_ProcessCode\": \"260\",\r\n \"Describe\": \"YJ-26/35kV-J-400||三层共挤\",\r\n \"Basic_MachineCode\": \"JL-JL01\",\r\n \"Basic_ItemOutCode\": \"8924290111\",\r\n \"Basic_ItemOutVersion\": \"100\",\r\n \"Coefficient\": \"1\",\r\n \"UnitInName\": \"km\",\r\n \"UnitOutName\": \"km\",\r\n \"OrgM_DeptCode\": \"B13\",\r\n \"ProcessPlanQty\": \"4.767\",\r\n \"ErpProcessRealQty\": \"0\",\r\n \"RecId\": \"WO23080900320_10_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:20\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"RowNo\": \"20\",\r\n \"Basic_ProcessCode\": \"330\",\r\n \"Describe\": \"铜带屏蔽\",\r\n \"Basic_MachineCode\": \"JL-PB01\",\r\n \"Basic_ItemOutCode\": \"\",\r\n \"Basic_ItemOutVersion\": \"100\",\r\n \"Coefficient\": \"1\",\r\n \"UnitInName\": \"km\",\r\n \"UnitOutName\": \"km\",\r\n \"OrgM_DeptCode\": \"B13\",\r\n \"ProcessPlanQty\": \"4.767\",\r\n \"ErpProcessRealQty\": \"0\",\r\n \"RecId\": \"WO23080900320_20_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:20\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"RowNo\": \"50\",\r\n \"Basic_ProcessCode\": \"460\",\r\n \"Describe\": \"外护套\",\r\n \"Basic_MachineCode\": \"JL-JS03\",\r\n \"Basic_ItemOutCode\": \"\",\r\n \"Basic_ItemOutVersion\": \"100\",\r\n \"Coefficient\": \"1\",\r\n \"UnitInName\": \"km\",\r\n \"UnitOutName\": \"km\",\r\n \"OrgM_DeptCode\": \"B13\",\r\n \"ProcessPlanQty\": \"4.767\",\r\n \"ErpProcessRealQty\": \"0\",\r\n \"RecId\": \"WO23080900320_50_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:20\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"RowNo\": \"40\",\r\n \"Basic_ProcessCode\": \"430\",\r\n \"Describe\": \"装铠\",\r\n \"Basic_MachineCode\": \"JL-PJ01\",\r\n \"Basic_ItemOutCode\": \"\",\r\n \"Basic_ItemOutVersion\": \"100\",\r\n \"Coefficient\": \"1\",\r\n \"UnitInName\": \"km\",\r\n \"UnitOutName\": \"km\",\r\n \"OrgM_DeptCode\": \"B13\",\r\n \"ProcessPlanQty\": \"4.767\",\r\n \"ErpProcessRealQty\": \"0\",\r\n \"RecId\": \"WO23080900320_40_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:20\"\r\n}",
"{\r\n \"Order_WorkOrderCode\": \"WO23080900320\",\r\n \"RowNo\": \"30\",\r\n \"Basic_ProcessCode\": \"390\",\r\n \"Describe\": \"挤包隔离套\",\r\n \"Basic_MachineCode\": \"JL-JS01\",\r\n \"Basic_ItemOutCode\": \"\",\r\n \"Basic_ItemOutVersion\": \"100\",\r\n \"Coefficient\": \"1\",\r\n \"UnitInName\": \"km\",\r\n \"UnitOutName\": \"km\",\r\n \"OrgM_DeptCode\": \"B13\",\r\n \"ProcessPlanQty\": \"4.767\",\r\n \"ErpProcessRealQty\": \"0\",\r\n \"RecId\": \"WO23080900320_30_\",\r\n \"Mdfdt\": \"2023/8/9 21:01:20\"\r\n}"
],
"DelKeys": null,
"NeedUpdateFields": null,
"LineDatas": null,
"EditIds": null,
"IsExtendEdit": false,
"IsPartialSave": false
}
],
"IsDraft": false,
"IsReleaseDraft": false,
"IsIgnoreVerifyStatus": true,
"OpFlowBtnId": null,
"ToDoTaskId": null,
"ChildTodoIds": null,
"ApprovalOpinions": null,
"ReturnNodeId": null,
"DirectHandler": null,
"IsAdd": 1,
"IsVeriyFormAllField": false,
"IsInterfaceData": true
}
正则表达式该如何写呢 非常抱歉,由于您的代码示例超过了当前对话模型一次请求的最大字数限制(4096个token),我无法一次处理这个请求。
为了解决这个问题,您可以尝试以下几种方法:
1. 缩短输入文本长度:如果可能的话,可以缩短输入文本的长度,以确保在限制范围内。这可以通过删除不必要的部分或者简化代码逻辑来实现。
2. 分割请求:将较长的文本分割成较短的片段,分多次发送给对话模型进行处理。然后,将每个响应整合在一起以获得最终结果。
3. 使用更大的模型:如果您使用的是较小的GPT-3模型,可以尝试切换到更大的模型(如gpt-3.5-turbo),它具有更高的最大令牌限制(4096个token)。
请注意,如果您选择将文本分割成多个片段进行处理,请确保在每个请求之间保持上下文的一致性,以便对话连贯。
如果问题已经解决,请设置最佳答案 陶远航 发表于 2023-8-10 15:23
非常抱歉,由于您的代码示例超过了当前对话模型一次请求的最大字数限制(4096个token),我无法一次处理这 ...
好吧 rsj0315 发表于 2023-8-10 15:24
好吧
他用的gpt 仅仅取出“WO23080900320”简单,正则表达式就直接写 "WO23080900320" 就行,可是这样的意义在哪呢?
所以你应该是别的需求,你先把你的需求说清楚点吧 isdkz 发表于 2023-8-10 15:31
仅仅取出“WO23080900320”简单,正则表达式就直接写 "WO23080900320" 就行,可是这样的意义在哪呢?
所 ...
很多好都是WO开头的
很多这种报文
我要从很多报文中去取WO数字这样的字符串出来 rsj0315 发表于 2023-8-10 15:33
很多好都是WO开头的
很多这种报文
我要从很多报文中去取WO数字这样的字符串出来
那就用 WO\d+
页:
[1]