Results 1 to 3 of 3
Thread: regex "iteration"
- 05-10-2011, 09:08 PM #1
Member
- Join Date
- Apr 2011
- Posts
- 25
- Rep Power
- 0
regex "iteration"
Hi,
i have this regex code:
what i want now, is to make bold code to be able to do this [[ ][0-9A-Za-z][0-9a-z]{0,14}]{1,4}Java Code:[0-9A-Z][0-9a-z]{1,14}[B]([ ][0-9A-Za-z][0-9a-z]{0,14})[/B]
That is, make sure this section is typed in at least once, but not more then 4 times.
How could i do that?
Ty!
- 05-11-2011, 11:08 AM #2
Member
- Join Date
- Apr 2011
- Posts
- 25
- Rep Power
- 0
no on?:confused:
- 05-11-2011, 11:39 AM #3
Use parentheses, not square brackets. Square brackets enclose a character class. Parentheses enclose a group.
Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns
db
Similar Threads
-
connection = DriverManager.getConnection(DATABASE_URL,'"+userid +"','"+password+"');
By renu in forum New To JavaReplies: 3Last Post: 10-12-2010, 04:21 PM -
How to change my form design from "metal" to "nimbus" in Netbeans 6.7.1?
By mlibot in forum New To JavaReplies: 1Last Post: 01-21-2010, 09:20 AM -
How "Pattern.matches(regex, input)" function works?
By kishan in forum Advanced JavaReplies: 2Last Post: 04-26-2009, 12:46 AM -
MoneyOut.println("It took you (whats wrong?>",year,"<WW?) years to repay the loan")
By soc86 in forum New To JavaReplies: 2Last Post: 01-24-2009, 06:56 PM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks