Results 1 to 5 of 5

Thread: [2008] using the +, ||, and * symbol in regex ruins my text?

Threaded View

  1. #1

    Thread Starter
    Frenzied Member Icyculyr's Avatar
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    1,934

    [2008] using the +, ||, and * symbol in regex ruins my text?

    I am inserting spaces before and after text, using regex, to make operators be spaced, IE:
    EDIT
    I AM ALSO UNABLE to use the characters "(" and ")"
    if (i>0) {}
    becomes
    if (i > 0) {}

    now it works great, but if I add the characters ||, * or +, it adds like 20 spaces in my text and totally ruins it? I end up with something like
    i f (i>0 ) {}

    etc..

    I am declaring the regex like this:

    Code:
    Dim rRegex As New Regex("\b||\b")
    , as an example

    Does anyone know why?
    Last edited by Icyculyr; Mar 15th, 2008 at 05:25 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width