match « parse « Java Regex Q&A

Home
Java Regex Q&A
1.Development
2.find
3.group
4.Match
5.matcher
6.number
7.Operation
8.parse
9.Pattern
10.replace
11.validation
12.word
Java Regex Q&A » parse » match 

1. What Java regular expression do I need to match this text?    stackoverflow.com

I'm trying to match the following using a regular expression in Java - I have some data separated by the two characters 'ZZ'. Each record starts with 'ZZ' and finishes ...

2. How to match a comment unless it's in a quoted string?    stackoverflow.com

So I have some string:

//Blah blah blach
// sdfkjlasdf
"Another //thing"
And I'm using java regex to replace all the lines that have double slashes like so:
theString = Pattern.compile("//(.*?)\\n", Pattern.DOTALL).matcher(theString).replaceAll("");
And it works for the ...

3. Regular Expression to Match " | "    stackoverflow.com

Hey guys, I am trying to use Java's useDelimiter method on it's Scanner class to do some simple parsing. Basically each line is a record delimited by " | ...

4. Regex to match a Java method signature    stackoverflow.com

I am having this particular requirement where a method has to be identified by different regular expressions for different components. For example, there need to be a regex for return parameter, ...

5. How to use regex's to parse a file in Java?    stackoverflow.com

I'm trying to use a series of regular expressions to parse tokens from a file. I need to count newlines and be able to separate tokens that don't have a ...

6. Bash style pattern matching, expansion and pathname parsing for Java    stackoverflow.com

My project has objects structured in a tree and needs to implement wild card and pattern matching, path expansion for accessing the said objects. This functionality is very similar to what ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.