Hi,
I have following strings
The string will always have /main and WORKAREA in it.
I have to extract the string which is next level of WORKAREA
i.e.
/main/eCommerce/Development/Release1_updated_Content/shop/production/WORKAREA/Application_Development
I have tried following regex, but it works only for string2 and not for string1
How can i acheive the required output?
I have following strings
Code:
string1: //ap21cnedc22/retail/main/eCommerce/Development/Release1_updated_Content/shop/production/WORKAREA/Application_Development
string2: //ap21cnedc22/retail/main/eCommerce/Development/Release1_updated_Content/shop/production/WORKAREA/Application_Development/test/test1
I have to extract the string which is next level of WORKAREA
i.e.
/main/eCommerce/Development/Release1_updated_Content/shop/production/WORKAREA/Application_Development
I have tried following regex, but it works only for string2 and not for string1
Code:
$string =~ m!(.*)/(.*)/(main.*)/(WORKAREA/.*?)/.*$!;
$output = '/'.$3.'/'.$4 ;