Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gets the content between two tags
#4
this will do both either output 
whole match
#if A
    part1
#endif
#if V
    part2
#endif
#if C
    part3
#endif 

or what's in between #if and #endif
part1
part2
part3
 
Code:
Copy      Help
ARRAY(str) a2
findrx(_s "#if.*(?s)(.*?)#endif" 0 4 a2)
for int'i 0 a2.len
,out a2[0 i];; output whole match
,;out a2[1 i].trim;;output just whats in between #if A(this part)#endif


Messages In This Thread
Gets the content between two tags - by Davider - 10-28-2022, 03:38 AM
RE: Gets the content between two tags - by Kevin - 10-28-2022, 12:42 PM
RE: Gets the content between two tags - by Kevin - 10-28-2022, 07:49 PM
RE: Gets the content between two tags - by Kevin - 11-02-2022, 01:49 PM
RE: Gets the content between two tags - by Kevin - 11-03-2022, 04:19 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)