regex (6,039)


Regex: To pull out a sub-string between two tags in a string

Regex: To pull out a sub-string between two tags in a string

I have a file in the following format: Data Data Data[Start] Data I want[End] Data I'd like to grab the Data I want from between the[Start] and[End] tags using a Regex. Can anyone show me how th…


What are the different methods to parse strings in Java?

For parsing player commands, I've most often used the split method to split a string by delimiters and then to then just figure out the rest by a series of ifs or switches. What are some different way…


flex - Actionscript 3-Fastest way to parse yyyy-mm-dd hh:mm:ss to a Date object?

I have been trying to find a really fast way to parse yyyy-mm-dd[hh:mm:ss] into a Date object. Here are the 3 ways I have tried doing it and the times it takes each method to parse 50,000 date time…



javascript - How can I turn a string of HTML into a DOM object in a Firefox extension?

I'm downloading a web page(tag soup HTML) with XMLHttpRequest and I want to take the output and turn it into a DOM object that I can then run XPATH queries on. How do I convert from a string into DO…


regex - Learning Regular Expressions

I don't really understand regular expressions. Can you explain them to me in an easy-to-follow manner? If there are any online tools or books, could you also link to them?…


regex - What are good regular expressions?

I have worked for 5 years mainly in java desktop applications accessing Oracle databases and I have never used regular expressions. Now I enter Stack Overflow and I see a lot of questions about them;…


.net - Regular expression for parsing links from a webpage?

I'm looking for a.NET regular expression extract all the URLs from a webpage but haven't found one to be comprehensive enough to cover all the different ways you can specify a link. And a side questio…


Remove Quotes and Commas from a String in MySQL

I'm importing some data from a CSV file, and numbers that are larger than 1000 get turned into 1,100 etc. What's a good way to remove both the quotes and the comma from this so I can put it into an…


How do you retrieve selected text using Regex in C#?

How do you retrieve selected text using Regex in C#? I am looking for C# code that is equivalent to this Perl code: $indexVal=0; if($string=~/Index:(\d*)/){$indexVal=$1;}…


How do I tell if a variable has a numeric value in Perl?

Is there a simple way in Perl that will allow me to determine if a given variable is numeric? Something along the lines of: if(is_number($x)){...}would be ideal. A technique that won't throw warnings…




string match regular expression replace javascript tester java characters python