|
-
May 22nd, 2013, 04:00 AM
#2
Re: Wrapping Numeric Characters with HTML tags
You should use regular expressions. I really should be better with them myself but I have rarely had the need to use them so I've never really developed a proficiency. They are used in .NET via the Regex class.
You'll first need to find out what the pattern is for a number of arbitrary length. Again, I should know that myself but I don't. It shouldn't be hard to find when you know what you're looking for though.
You can then use the Regex.Matches method to find all the occurrences of numbers in your text and then use Regex.Replace to replace occurrences of numbers with some other text, which would be your span element containing the original number.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|