I need to translate these oracle command into Informatica (IICS).
Please could you tell me how to do?
Regards
replace(translate(HDDJD_DG,'²¿àçéèîÀÇɵ',' '),' ','')
and the last one
cast('RAP' as varchar2(3))
Thanks for your help
Try using the REG_REPLACE function. I'm not sure if this will work simply as:
REG_REPLACE( HDDJD_DG, '²¿àçéèîÀÇɵ', '')
or if you'd need to trim after replace:
LTRIM(RTRIM(REG_REPLACE( HDDJD_DG, '²¿àçéèîÀÇɵ', '')))
Related
Imagine I have the following file names:
ZRD0004170011600001020190521.dat
ZRD0004170011600001020190521.pdf
ZRD0004170011600001020190521_TC.pdf
FLX0004170007100001020180630.dat
RES0004170007100001020180331.dat
RES0004170007100001020180930.dat
RES0004170007100001020181231.dat
RES0004170012200001020180930.dat
RES0004170012200001020181231.dat
ZNP0004170120190226.dat
ZNP0004170120190226.pdf
ZRD0004170012600001020190520.dat
ZRD0004170012600001020190520.pdf
ZRD0004170012600001020190520_TC.pdf
I want to detect the date pattern YYYYMMDD which is appearing in these files, which can appear immediately before "." or before "_TC".
Can someone help me here?
Thanks in advance!
Normally, I think you can use this regex :
[0-9]{8}(\.|_TC)
Is it what you want ?
I want to make a redirection on an url :
/XX/YY/ZZ%3E%3E%3E%3E%3E%3E%3E%3E%3E => /XX/YY/ZZ
I don't find the good regex to remove multi match "%3E" at the end of the url.
Can you help me please ?
This should work (for actual URLs with the indicated kind of suffix):
x = "https://www.test.com/XX/YY/ZZ%3E%3E%3E%3E%3E%3E%3E%3E%3E"
s.gsub(/(%3E)+$/,"")
Try this pattern:
\/[\w]{2}
You can test it online
Thank you Human and Drux !
You really helped me to find the solution :
r301 %r{^/XX/([\w\/]*)(%3E)+$}, '/XX/$1'
I'm trying to write a regex to filter the values, that exist between curly braces:
Example: $path = C:\serices\ApplicationName\{{NewFolderName}}
I want to filter the value "NewFolderName" from the above variable. Once I execute, I want to see "NewFolderName" in my output. I'm using PowerShell version 2.0. Can someone please suggest me the possible solution.
Thanks in advance.
One way would be:
\{{2}(.*?)\}{2}
See a demo on ideone.com.
Here's the full powershell for your question.
$path = "C:\users\{{XXX}}\Downloads\{{YYY}}\AppName"
$matches = [regex]::Matches($path,"\{{2}(.*?)\}{2}").value
I am trying to extract dates from a text variable.
I have created a regex which extracts 'MOST' formats of date as follows:
$regexp = '#[0-9]{2,4}[-\/ ]{1}([A-Za-z]{3}|[0-9]{2})[-\/ ]{1}[0-9]{2,4}#';
preg_match_all($regexp, $output, $dates);
It does not however extract dates of the format '08 Aug 2012' and I do not know why.. As far as I can tell.. it should..
For now I have inserted a seperate regex which works:
$regexp = '#[0-9]{2}[ ]{1}[A-Za-z]{3}[ ]{1}[0-9]{4}#';
preg_match_all($regexp, $output, $dates);
which is essentially the same..
It however seems pointless to have multiple regex when I need only have one.
If anyone could tell me why the first regex isnt working for such a format, and explain why, it would be greatly appreciated.
Thanks
Well, your regexp is correct for the date format you presented. And as such it also works without problems: http://ideone.com/XxdKV
i want to grap data from this site by regexp
http://aymanalrefai.wordpress.com/2010/03/15/596/
i tried this
/<div class="entry">.*?<p class="postinfo">/is
but it didn't give me a correct result
any help ?
Try this :
/<div class="entry">[\s\S]+?</div>/is