#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2011
    Posts
    1
    Rep Power
    0

    Post Help with VB Regex


    Hi all,

    I would like to use REGEX to search for string "/>" and capture the entire string (without space) enclosed between "< and /" and replace it with <String>TRUE</String>
    for eg: I would like to search for <Monday /> then capture this in a variable say "String" and then replace this with <Monday>True</Monday>.
    Can you please provide me with the script and instructions to use the same. I am a novice at this!!

    Please help.

    Regards,
    Kaustubh
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,056
    Rep Power
    9398
    Don't use regular expressions.
    Do use whatever XML parsing libraries are available to you. .NET, for one, has the System.Xml namespace.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    23
    Rep Power
    0

    use replace?


    Originally Posted by Kaustubh.kadu
    Hi all,

    I would like to use REGEX to search for string "/>" and capture the entire string (without space) enclosed between "< and /" and replace it with <String>TRUE</String>
    for eg: I would like to search for <Monday /> then capture this in a variable say "String" and then replace this with <Monday>True</Monday>.
    Can you please provide me with the script and instructions to use the same. I am a novice at this!!

    Please help.

    Regards,
    Kaustubh
    if you are asking for a particular <tag/> then you could use replace in vb or even cmd

    in vb A$= replace (a$,"<tag/>","<tag>true</tag>")

IMN logo majestic logo threadwatch logo seochat tools logo