| Author | Message | 
		
		  | varunraot | 
			  
				|  Posted: Wed Feb 07, 2018 2:25 am    Post subject: Regular Expression to pick two different file name |   |  | 
		
		  | Acolyte
 
 
 Joined: 01 Jun 2011Posts: 63
 
 
 | 
			  
				| Appreciate your help in helping me with regular expression or wild card for below 2 files containing the keyword RES & UDR. The requirement is to pick only the XML files from a directory having the keyword RES or UDR ( or both) 
 Example:
 
 QM_2017121114173526400_WI90_KM_UDR.xml
 
 QM_2017022019000817400_WI90_KM_RES.xml
 
 
 The idea is to have entry in "Match Pattern" only in MQ MFT resource monitor.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Wed Feb 07, 2018 5:47 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| *UDR.XML 
 or
 
 *RES.XML
 
 Clearly you've already thought of that, so you  might need to expound on the problem a little
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | fjb_saper | 
			  
				|  Posted: Wed Feb 07, 2018 6:38 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| 
   
	| Vitor wrote: |  
	| *UDR.XML 
 or
 
 *RES.XML
 
 Clearly you've already thought of that, so you  might need to expound on the problem a little
 |  Shouldn't it be
 
 
  ?  Note the dot before the star... 
	| Code: |  
	| .*UDR.XML .*RES.XML
 |   _________________
 MQ & Broker admin
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Wed Feb 07, 2018 6:52 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| fjb_saper wrote: |  
	| Shouldn't it be 
 
  ?  Note the dot before the star... 
	| Code: |  
	| .*UDR.XML .*RES.XML
 |   |  
 If it's a RegEx not a simple wildcard.
 
 But again, that's fairly simple so the OP should have a trickier problem than that.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | varunraot | 
			  
				|  Posted: Sat Feb 24, 2018 1:42 am    Post subject: |   |  | 
		
		  | Acolyte
 
 
 Joined: 01 Jun 2011Posts: 63
 
 
 | 
			  
				| I used Regular Expression in place of wild card as lot more can be done with regex. In this case I used ^.*(?:RES|UDR).*+$ which picks up the file having RES or UDR keyword in a file name.  Posting this as it might be useful for other people who visits the site for similar requirement |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |