faustf Posted August 31, 2016 Share Posted August 31, 2016 hi guys i have some problem about one regular expression i have a xml like this GetCategoryFeaturesResponse xmlns="urn:ebay:apis:eBLBaseComponents" <Timestamp>2016-08-31T09:04:59.494Z Ack Success Version 969 Build E969_INTL_APICATALOG_17991264_R1 CategoryVersion 986 UpdateTime 2016-08-30T09:44:13.000Z Category <CategoryID>15032 ConditionEnabled Required ConditionValues <Condition><ID>1000 DisplayName Nuovo /Condition <Condition><ID>1500 DisplayName Nuovo: altro (vedi dettagli) /Condition <Condition><ID>2000 DisplayName Ricondizionato dal produttore /Condition <Condition><ID>2500 DisplayName Ricondizionato dal venditore /Condition <Condition><ID>3000 DisplayName Usato /Condition <Condition><ID>7000 DisplayName Per parti di ricambio o non funzionante /Condition <ConditionHelpURL>http://pages.ebay.it/help/sell/contextual/condition_1.html /ConditionValues Category <CategoryID>296 ConditionValues <Condition><ID>1000 DisplayName Nuovo /Condition <Condition><ID>3000 DisplayName Usato /Condition <ConditionHelpURL>http://pages.ebay.it/help/sell/contextual/condition_5.html /ConditionValues Category <CategoryID>43307 ConditionValues <Condition><ID>1000 DisplayName Nuovo /Condition <Condition><ID>3000 DisplayName Usato /Condition <ConditionHelpURL>http://pages.ebay.it/help/sell/contextual/condition_5.html /ConditionValues Category <CategoryID>80087 ConditionValues <Condition><ID>1000 DisplayName Nuovo /Condition <Condition><ID>3000 DisplayName Usato /Condition <ConditionHelpURL>http://pages.ebay.it/help/sell/contextual/condition_5.html /ConditionValues Category <CategoryID>42427 ConditionEnabled Enabled ConditionValues <Condition><ID>1000 DisplayName Nuovo /Condition <Condition><ID>3000 DisplayName Usato /Condition <ConditionHelpURL>http://pages.ebay.it/help/sell/contextual/condition_5.html /ConditionValues SiteDefaults <ConditionEnabled>Disabled /SiteDefaults <FeatureDefinitions><ConditionEnabled/><ConditionValues/> i want take the content of <Condition><ID> to.. /Condition i try to use somthing like this (?i)<Condition><ID>(.*?)\r but unfortunaly not work , also because in vertical i dont know how tell at stringregexp return some one can help me?? thankz Link to comment Share on other sites More sharing options...
AutoBert Posted August 31, 2016 Share Posted August 31, 2016 Why not using _StringBetween? #include <String.au3> #include <Array.au3> $sData=FileRead('condition.txt') $sData=StringReplace($sData,@CRLF,'|'); for better display ConsoleWrite($sData&@CRLF) $sData=_StringBetween($sData,'<Condition><ID>','/Condition') _ArrayDisplay($sData) i saved the text in condition.txt Link to comment Share on other sites More sharing options...
faustf Posted August 31, 2016 Author Share Posted August 31, 2016 probably because i am sadist , joke thankz sure use _StringBetween , thankz so much Link to comment Share on other sites More sharing options...
jguinch Posted August 31, 2016 Share Posted August 31, 2016 add the (?s) parameter : <Condition>\s*<ID>(.*?)/Condition Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now