Viewing 15 posts - 61 through 75 (of 164 total)
guys, sorry for messing up the formatting. will be more careful next time.
January 2, 2007 at 2:51 pm
from BOL:
SELECT SUBTRING(FirstName,1,1) AS Initial, LastNameFROM Employees
This is the result set:
Initial..........LastName-------------------------A................FunkM................PearsonL................CalafatoN................DannerJ................LeeS................ByhamM................SutterR................KingA................Doyle
January 2, 2007 at 2:49 pm
r u talking about tabular data that have hyperlinks? also pls post some examples of the text.
December 21, 2006 at 11:18 am
Remi,
thought u might want to see the rest of the thread. Thanks.
Sergei
December 21, 2006 at 9:22 am
kkprasad,
just tried your code, it returns
'king note Subject: blah, blah, blah Complaint: duh duh duh Object: dee dee deed 12:57:00 11/01/06'
is that what u expected, or i'm doing smth wrong...
December 20, 2006 at 4:54 pm
yes, but the problem is Max does not know what keyword will be there up front: his data could vary. What he needs is to split on a pattern
[date] [some_text]
,...
December 20, 2006 at 4:52 pm
so u want to split the record:
14:57:00 12/01/06 (Pacific) Person making note Subject: blah, blah, blah Complaint: duh duh duh Object: dee dee deed 12:57:00 11/01/06 (Pacific) Person making note Subject: blah, blah,...
December 20, 2006 at 3:21 pm
Assuming that u have data in comment1 and comment2 like:
‘Text1”Text2’
do u want:
1) change the original...
December 20, 2006 at 8:53 am
sorry, the thing got messed up in my prev post: [hopefully works now]
select mystring, dbo.Regex_Replace(mystring, '(<a[^<>]*> ) ([^<>]*) ( </a> )', '$2') as myCleanString from dbo.X
December 19, 2006 at 10:11 pm
as an example it's possible to render the original text [from say fld "mystring" in tbl dbo.X]
<a href="my_target_texthttp://www.sergiy.org">my_target_text</a><some_other_not_targeted_tagged_text>
to
my_target_text<some_other_not_targeted_tagged_text>
by using this CLR-based Regex function call:
select mystring, dbo.Regex_Replace(mystring, '(<a[^<>]*>
December 19, 2006 at 9:52 pm
u r absolutely right Sergiy: that's exactly the procedure that must be followed. For that purpose, more complex regular expressions patterns exist. Like, for example:
match the opening tag <u>, then...
December 19, 2006 at 9:39 pm
Sergiy,
*normal simple mind people* is the last notion that comes to my mind when I read your posts. I enjoy them a lot thou
December 18, 2006 at 4:00 pm
i just realised that task like this has been discussed already:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=320575&p=2
and i posted some code for SQL Server 2005 there.
after the CLR dbo.Regex_Replace is compiled in...
December 18, 2006 at 3:55 pm
Remi,
With <[^<>]*>, I just gave a generic regular expression for matching a generic <…> tag.
December 18, 2006 at 3:41 pm
David I:
It is not a gremlin emoticon. It is a regular expression pattern saying:
December 18, 2006 at 3:37 pm
Viewing 15 posts - 61 through 75 (of 164 total)