Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » replace
Showing page 1 of 3 (24 total posts)
  • <font> to <span>

    I want to change a font element to an XHTML compatible variant. e.g. find <font face="arial" size="1" color="red" >hello world</font> replace <span style='font-family: arial; font-size: 1; color: red;'>hello world</span>   note: - the font attributes can change order - ...
    Posted to Construction Advice (Forum) by iCon on July 8, 2010
  • Replacing elements of a pattern as part of the matching process?

    I am trying to matching a sub group, but replace the content of that sub group in the resulting string with something else.  For example, say I want to match a phone number like 800-123-4567 with \d3-\d{3}-\d{4} but get out of it 800-1234 567 (replacing the '-' with ' ' but only within the number, not after the area code). I ...
    Posted to Construction Advice (Forum) by patrickq on September 18, 2009
  • find if either stringa or stringb do not exist in a string

    I am working on making a bbcode system with php using preg_replace(), and I am making it so that other tags will not work inside of a code block. This is the code I am currently using, it almost works: /(?!\[code\])(.*)(\[b\])(.+)(\[\/b\])(.*)(?<!\[\/code\])/Usi  what I want it to do is if [*code] and [*/code] are around the text inside, ...
    Posted to Construction Advice (Forum) by sarathi on July 31, 2009
  • Numbering by a 5 year old

    Hi Im am writing a function in SQL Server 2005 using a simple C# assembly that implements C# regex functions. I found the assembly on codeproject. The data I am trying to modify contains numbering, that was entered by a 5 year old probably.  Here is 5 of the problem data on the LEFT and data I need to return on the RIGHT The word ...
    Posted to Construction Advice (Forum) by HeavenBurns on June 10, 2009
  • Date increment

    Hi all, first post, so I hope I'm posting this correctly. I need to increment the hour in JavaScript by 1 (i.e. I need to get the current hour, add an hour, and then return the answer). An example of the string is as follows (the hour is bolded): 2009-05-18T16:15:00Z I'm re-learning RegEx after not visiting it for years, so I'd ...
    Posted to Construction Advice (Forum) by regexn00bpain on May 18, 2009
  • Search and trim the result with a single regular expression

    Hi all, Please help to me to solve my problem. I want to search inthe following string. “Your user id is U101 and password is P101” I want to capture 101 following the letter ‘U’. I can get itusing the regular expression “U(\d)+”. But the result is carrying the letter‘U’. I can’t ...
    Posted to Construction Advice (Forum) by thomas_joyeee on April 2, 2009
  • Insert missing trademark and registered symbols

    Hi I`m using ASP.NET C# and need to create a web application to autofix some text where company name and product names are missing ®(registered) and ™(trademark) symbols. We have a huge amount of text as articles in 30 different languages. I`m planning to use RegExs MatchCollection to find all hits in each article and then replace ...
    Posted to Construction Advice (Forum) by nestur on December 9, 2008
  • Tooltip word replacement

    Hi I'm currently working on a ASP.NET project where i want to replace sertain words with a link ex. "all your base are belong to us, is a cool phrase" if I want to replace the letter a as in "a cool phrase" with <a href="/#mylink">a</a> i want the new string to look like this, "all your base ...
    Posted to Construction Advice (Forum) by gralov on November 14, 2008
  • Replacing space within anchor tag

    HI,  I'm using c# I need to replace all spaces between <a and > this mean only within the opening tag. i would like to replace the space with [SAVESPACE] Example: Input: Hello. <a href='blaaa' target='_blank'>hello world</a> blaaa <a href='blaaa2' ...
    Posted to Construction Advice (Forum) by SectionI on October 29, 2008
  • Replacing text with matched text from same string

    Hello, I need help on matching and replacing text with different matched text from same string. My goal is to be able to batch process a large set of text files that each have similar patterns and replacement criteria. Below is an example of a typical case. In the example below, BOLD text replaces strikeout text: TITLE: Beautiful Losers - ...
    Posted to Construction Advice (Forum) by dhl on August 15, 2008
1 2 3 Next >