|  | 
	
	
		| Xiija Beginner
 
 
 Joined: 24 Apr 2018
 Posts: 10
 
 
 | 
			
			  |  Posted: Tue Aug 13, 2019 1:11 pm 
 help with string capture
 
 |  
				| I have a trigger i can't capture because it has multiple alternatives. 
 Valid NPC targets here:  monster.
 Valid NPC targets here:  cat effigy.
 Valid NPC targets here:  cat effigy, monster, wisp bog gas.
 
 How would one separate any of these targets into a list plz?
 ( or capture them in any fashion )
 
 Thanx for any help :)
 |  | 
	
	  |  | 
	
		|  | 
	
		| shalimar GURU
 
  
 Joined: 04 Aug 2002
 Posts: 4774
 Location: Pensacola, FL, USA
 
 | 
			
			  |  Posted: Tue Aug 13, 2019 4:20 pm 
 |  
				| #TR {Valid NPC targets here: (*).} {targetList=%replace(%1, ", ", "|")} 
 |  | 
	
	  | 
		    
			  | _________________ Discord: Shalimarwildcat
 |   |  | 
	
		|  | 
	
		| Xiija Beginner
 
 
 Joined: 24 Apr 2018
 Posts: 10
 
 
 | 
			
			  |  Posted: Tue Aug 13, 2019 5:21 pm 
 |  
				| I was trying that.. got a weird result tho? 
 line from mud: Valid NPC targets here:  cat effigy, monster, wisp bog gas.
 
 captured: cat effigy, monster, wisp bog gas
 result: cat effigy
 
 if I do this...
 
 #var trgList %replace( ( %1 ), ", ", "|")
 
 i get this..( with the added braces, not a string list yet )
 
 result: ( cat effigy|monster|wisp bog gas )
 |  | 
	
	  |  | 
	
		|  | 
	
		| shalimar GURU
 
  
 Joined: 04 Aug 2002
 Posts: 4774
 Location: Pensacola, FL, USA
 
 | 
			
			  |  Posted: Wed Aug 14, 2019 8:54 pm 
 |  
				| my example should give you the following string list: 
 cat effigy|monster|wisp bog gas
 |  | 
	
	  | 
		    
			  | _________________ Discord: Shalimarwildcat
 |   |  | 
	
		|  | 
	
		|  | 
	
		|  |