Regex Problem with Database Data (Unicode?)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • progman417
    New Member
    • Mar 2008
    • 13

    Regex Problem with Database Data (Unicode?)

    Hello,

    I'm using the following Rexex function to strip HTML tags from text:

    return Regex.Replace(t ext, "<.*?>", String.Empty);

    If I set text manually to something like "<b>test</b>" then it correctly returns "test".

    But ... if I have a field in the database with the same input value, it returns it unmodified.

    I'm guessing that the DB value might be Unicode? If so, how can I get the regex expression to work?

    Also, is there a way the regex expression could be extended to also cover Encoded Html?

    Thanks!
  • progman417
    New Member
    • Mar 2008
    • 13

    #2
    Not sure what was causing it, but now it's working fine!

    Comment

    Working...