Re: Need some help in creating Regex Expression

2019-05-31 Thread Endre Kovács
Hi,

Also when in doubt, you can always experiment, check and learn regex in online 
places like:

https://regex101.com/#pcre 
or
https://regexr.com/ 

where you can also specify a test string you want to match for.
Best regards,
Endre

> On 31 May 2019, at 18:47, ravva  wrote:
> 
> Hello - I have input files as below 
> 
> CanadaCST_prices.csv
> CanadaEST_prices.csv
> CanadaMST_prices.csv
> CanadaPST_prices.csv
> cst_prices.csv
> est_prices.csv
> mst_prices.csv
> pst_prices.csv
> 
> I have to write 2  regex expressions where in one of them I need to get only
> the file names that are starting with cst,est,mst,pst . In the second regex
> I need to pull the files that are starting with
> CanadaCST,CanadaEST,CanadaPST,CanadaMST. 
> 
> Can someone suggest on how to create a regex for this scenario.
> 
> Thanks,
> 
> 
> 
> 
> 
> --
> Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/



Re: Need some help in creating Regex Expression

2019-05-31 Thread Andy LoPresto
These two expressions should work:

^[cemp]st.*\.csv

^Canada[CEMP]ST.*\.csv

Andy LoPresto
alopre...@apache.org
alopresto.apa...@gmail.com
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On May 31, 2019, at 9:47 AM, ravva  wrote:
> 
> Hello - I have input files as below 
> 
> CanadaCST_prices.csv
> CanadaEST_prices.csv
> CanadaMST_prices.csv
> CanadaPST_prices.csv
> cst_prices.csv
> est_prices.csv
> mst_prices.csv
> pst_prices.csv
> 
> I have to write 2  regex expressions where in one of them I need to get only
> the file names that are starting with cst,est,mst,pst . In the second regex
> I need to pull the files that are starting with
> CanadaCST,CanadaEST,CanadaPST,CanadaMST. 
> 
> Can someone suggest on how to create a regex for this scenario.
> 
> Thanks,
> 
> 
> 
> 
> 
> --
> Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/