Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pattern matching

 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have to search for string patterns in big strings. The pattern as well as the string in question may be noisy meaning they may contain characters that need to be escaped while employing pattern matching using regex. For this reason, when I say String.split(str), I get lot of PatternSyntaxExceptions with messages like "Dangling meta character '?' near index, Unclosed group near index 5446 etc...". Is there any tool or API which takes care of handling these noisy strings while matching patterns using regex.
Regards.
 
shankar vembu
Ranch Hand
Posts: 309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just got carried away, huh. String.indexOf(string) will solve my problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic