By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,056 Members | 1,320 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,056 IT Pros & Developers. It's quick & easy.

Find non-quoted string using RegEx

P: n/a
Joe
I need to do a find/replace on a column name in DataColumn.Expression.

Is there a way to do the following using RegEx?

MyColumn 10 and Desc = "This is MyColumn desc"

I need to replace the MyColumn which is not in a quoted string.

Thanks,
Joe
Sep 29 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Do you know what hte value will be beforehand? If so it could be a
simple regex.Replace type of thing.

If you need more info on regex I have a short tutorial on my site:
http://devdistrict.com/CodeDetails.aspx?A=314
Kelly Elias
Webmaster
http://devdistrict.com
Joe wrote:
I need to do a find/replace on a column name in DataColumn.Expression.

Is there a way to do the following using RegEx?

MyColumn 10 and Desc = "This is MyColumn desc"

I need to replace the MyColumn which is not in a quoted string.

Thanks,
Joe
Sep 29 '06 #2

P: n/a
Joe
The problem with replace is that it will replace all instances of the value
even if it is contained in a quoted string. I need to replace the value that
is not in a quoted string.

"Cryptik" <ke*********@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Do you know what hte value will be beforehand? If so it could be a
simple regex.Replace type of thing.

If you need more info on regex I have a short tutorial on my site:
http://devdistrict.com/CodeDetails.aspx?A=314
Kelly Elias
Webmaster
http://devdistrict.com
Joe wrote:
>I need to do a find/replace on a column name in DataColumn.Expression.

Is there a way to do the following using RegEx?

MyColumn 10 and Desc = "This is MyColumn desc"

I need to replace the MyColumn which is not in a quoted string.

Thanks,
Joe

Sep 30 '06 #3

P: n/a
Hi Joe,

The Regular Expression replacement needs to following certain pattern.
Which means that you need to find out a rule what your expression will be.
For example, is your expression always like this

MyColumn 10 and Desc = "This is MyColumn desc"

Or it will be more complex? What are the "MyColumn"s you need to replace
will be? Just replace all that is not in the quotes? Please let me know
more about this, so that I can deliver my further assistance. Thank you!

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 2 '06 #4

P: n/a
Hi Joe,

I'd like to know if this issue has been resolved yet. Is there anything
that I can help. I'm still monitoring on it. If you have any questions,
please feel free to post them in the community.

Kevin Yu
Microsoft Online Community Support
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Oct 5 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.