-1
votes
2answers
34 views

java regex expression escape characters

Hi i'm trying to split a string separated by vertical bars. for example: String str = "a=1|b=2"; In java, we should do like this: str.split("\\|"); If I use a single slash: str.split("\|"); ...
1
vote
3answers
34 views

Regex expression to match update_1_0_3_to_1_0_4 in java

What is the correct regular expression to match the following string in java ? update_1_0_3_to_1_0_4 I tried boolean t1= files.matches("^update_\\d_\\d_\\d{1,2}$\\_to_\\d_\\d_\\d{1,2}$"); ...
1
vote
0answers
17 views

Struts2 JSON plugin includeProperties - not full regex support?

The documentation for Struts2 plugin version 2.3.x says that the includeProperties parameter can be set, and behaves as follows: A comma-delimited list of regular expressions can be passed to the ...
7
votes
2answers
93 views

what is wrong with matcher.find()?

String s = "1.01"; Matcher matcher = Pattern.compile("[+-/\\*\\^\\%]").matcher(s); if (matcher.find()) { System.out.println(matcher.group()); } Input string is "1.01" and output is ".". I can't ...
2
votes
4answers
73 views

How to iterate over regex expression

lets say I have the following String: name1=gil;name2=orit; I want to find all the patterns that match name=value and make sure that the whole string matches the pattern. So I did the following ...
1
vote
2answers
67 views

Using regex to verify an int, my way isnt working

I want to make sure a string is a legal int. This means that it must be a number (with no "."). However, spaces are allowed both at the beginning as well as after the legal value. The following ...
0
votes
2answers
33 views

Ignoring case for a whole pattern of strings

regexp are not my strong point but I have a list of 4 strings that I want to check for. I created a pattern which is readable(to me) so more can be added easily but I am 99% sure none will be. The ...
-1
votes
3answers
66 views

How to code multiple patterns for the same match in java

I need to extract different types of values present in text like simple values ,exponent values etc. For which I wrote different regular expressions . Just I want to use all these regular expressions ...
0
votes
4answers
48 views

regular expression in Eclipse search

I need search some words in Eclipse wokspace. It should be exaclty matching that word. I need to search 'AT' in eclipse workspace. But when I use eclipse search for AT it gives all the results which ...
2
votes
3answers
40 views

a strange regular on look behind

i write a piece of program to fetch content from a string between ":"(may not have) and "@" and order guaranteed,for example a string like "url:[email protected]",the I fetch "123",or "[email protected]" then i ...
0
votes
2answers
21 views

To extract text from square bracket java regex

How can I extract the texts within the CardType:[ ..... ] CardType:[ CashRebate=[true], Platinum=[true], CoBrandCard=[true]{CoBrandType:Holt Renfrew}, ChargeCard=[true], ConsumerCard=[true], Product ...
0
votes
2answers
31 views

How to write an @Path regular expression to capture these parts of the path with whitespace in JAX-RS?

Given a URI like: /2013/03%20-%20March/15%20-%20Friday/1AC37325007 I have tried the following and I can't seem to get a match; ...
0
votes
0answers
50 views

How can i create a mini programming language inside a XML using JAVA? [closed]

I created the follow syntax inside a XML: <api name="XXX" operation="XXX"> func:map(/request/operationRequest/inparam) func:declare(clientId, ...
1
vote
1answer
70 views

regular expression diffrences

I have the following HTML that I wish to find the currently playing artist and song title my regular expression works in http://gskinner.com/RegExr/ and it compiles in Java correctly yet it doesn't ...
1
vote
2answers
55 views

Validate that password doesn't contain 3+ consecutive characters from name

I need to do this following password validation in Java Must be at least 8 characters in length Must contain at least 1 number Must contain at least 1 upper case letter Must contain at least 1 lower ...

1 2 3 4 5 398
15 30 50 per page