ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexIBM MQ File Transfer EditionRegular Expression to pick two different file name

Post new topicReply to topic
Regular Expression to pick two different file name View previous topic :: View next topic
Author Message
varunraot
PostPosted: Wed Feb 07, 2018 2:25 am Post subject: Regular Expression to pick two different file name Reply with quote

Acolyte

Joined: 01 Jun 2011
Posts: 62

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
View user's profile Send private message
Vitor
PostPosted: Wed Feb 07, 2018 5:47 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25114
Location: Ohio, 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
View user's profile Send private message
fjb_saper
PostPosted: Wed Feb 07, 2018 6:38 am Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19727
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
Code:
.*UDR.XML
.*RES.XML
? Note the dot before the star...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed Feb 07, 2018 6:52 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25114
Location: Ohio, USA

fjb_saper wrote:
Shouldn't it be
Code:
.*UDR.XML
.*RES.XML
? Note the dot before the star...


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
View user's profile Send private message
varunraot
PostPosted: Sat Feb 24, 2018 1:42 am Post subject: Reply with quote

Acolyte

Joined: 01 Jun 2011
Posts: 62

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
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ File Transfer EditionRegular Expression to pick two different file name
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.