rapt0r 3 Posted April 27, 2012 Report Share Posted April 27, 2012 Can someone please help me out with regex. I been going crazy trying to figure this out. This is the text "ABCD" (This text will change but it will always be uppercase letters only) I just want it to find all letters A-Z and add "{" to the left and "}" to the right of each letter. And the the result would like like this: {A}{B}{C}{D} I need this to use regex and not padding or any other way. I actually need this help for a different program, not sure if im allowed to ask here. If its a problem im sorry and you can delete the thread. The program gives me this: Find:Replace: And i am allowed to use regex for those two options. Thanks Quote Link to post Share on other sites
wakins4u 12 Posted April 27, 2012 Report Share Posted April 27, 2012 Although I don't have a precise solution to the above, but these two programs made regex very easy 4 me to use: http://www.regexbuddy.com/download.htmlhttp://www.regexmagic.com/download.html GoodluckW. Quote Link to post Share on other sites
rapt0r 3 Posted April 29, 2012 Author Report Share Posted April 29, 2012 Thanks for the links looks like gotta pay for that software. I really dont need to use regex that much. Only this one time. When i'll really start needing it i'll probably get the software since it would make the process much easier.. still looking for a solution. i wonder if its even possible to do what i want in regex, hoping someone who has good knowledge with regex can help me out please. Quote Link to post Share on other sites
Legend 181 Posted April 29, 2012 Report Share Posted April 29, 2012 You can do this without regex... just a series of replace commands... set(#variable, $replace(#variable, "A", "\{A\}"), "Global"), etc... http://ubotstudio.com/forum/public/style_emoticons/default/rolleyes.gif Find: AReplace: {A} Quote Link to post Share on other sites
rapt0r 3 Posted April 29, 2012 Author Report Share Posted April 29, 2012 that would be a lot of replace commands , i can probably just make it grab each letter 1 by one from the text and replace it and have it in a loop but i wish i could get regex to do this because it would be better and would not need to loop. i guess i have no choice now lol thanks Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.