• Post Reply Bookmark Topic Watch Topic
  • New Topic

regex example for a citation  RSS feed

 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys im having trouble building a regex. I think it should be
simple (shouldnt we be able to use the * character anywhere ???) But
Im getting a dangling meta character exception.




I know this should be really simple but can someone throw me a bone on
how to match the example string to a java regex pattern ?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
* means that the *preceding* character/group can occur an arbitrary number of times. Therefore * cannot possibly be the very first character in a regex.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!