Coast Line
asked on
Need some Guidance on RegEx
Hi, I need a Code where i can fetch the date of the following format. I am looking for Regular expression but as i am very basic in RegEx, so can't find a way to figure out
The dates and the months and the year can be changed [but the pattern will not change]
21 August , 2010 - 19 March, 2011
November 14, 2011 - February 30, 2012
The dates and the months and the year can be changed [but the pattern will not change]
ASKER
i want to grab the both with - sign, how will that be a combination
Regards
Regards
This for the first:
\b\d{2}\s[a-zA-Z]+\s?,\s\d {4}\s-\s\d {2}\s[a-zA -Z]+\s?,\s \d{4}\b
and this for the second:
\b[a-zA-Z]+\s\d{2},\s\d{4} \s-\s[a-zA -Z]+\s\d{2 },\s\d{4}\ b
\b\d{2}\s[a-zA-Z]+\s?,\s\d
and this for the second:
\b[a-zA-Z]+\s\d{2},\s\d{4}
ASKER
Thanks Budy, if you can help more how can i find a string of a link and email address from a string
the following string like
This is the world and i am now testing with the following string. The String is http://www.domain.com/classess/dataformat/anythingbeyon and let us see where we get this. This is the email address of the following, robert junior <a@a.com>
both should be found differently
Regards
the following string like
This is the world and i am now testing with the following string. The String is http://www.domain.com/classess/dataformat/anythingbeyon and let us see where we get this. This is the email address of the following, robert junior <a@a.com>
both should be found differently
Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi for url i have this:
(((f|ht){1}tp://)[-a-zA-Z0 -9@:%_\+.~ ##?&//=]+)
i used ## two times as coldfusion will escape one when it gets compiled, but this has a limitation as it checks for http, what if i have https:, ftp or neitehr ftp http or https
please guide
(((f|ht){1}tp://)[-a-zA-Z0
i used ## two times as coldfusion will escape one when it gets compiled, but this has a limitation as it checks for http, what if i have https:, ftp or neitehr ftp http or https
please guide
The regex I provided above works with all protocols: why don't you use it?
Anyway, you can modify your regex this way:
(((f|ht){1}tp(s)?://)[-a-z A-Z0-9@:%_ \+.~##?&// =]+)
(((f|ht){1}tp(s)?://)[-a-z
ASKER
Thanks Pal
Glad to help you! On to the next.
\b\d{2}\s[a-zA-Z]+\s?,\s\d
and this grabs the secnd two dates, always without - :
\b[a-zA-Z]+\s\d{2},\s\d{4}