• Post Reply Bookmark Topic Watch Topic
  • New Topic

Regexes and Pattern.MULTILINE  RSS feed

 
Katrina Owen
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to extract some data from a file using regexes.

In order to test the basic pattern before expanding it with capturing groups etc, I decided try the following:



It keeps not working.

I find 703 occurrences when doing either of the following:



But trying to capture the whole thing gives me nothing.

Anything obvious that I am missing?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A similar problem was discussed in this thread. Instead of trying to help and getting it wrong again ( :roll: ), I'll just point you to it and let Jim handle the follow-ups.
 
Katrina Owen
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf
 
Katrina Owen
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bingo.



returns 1 result (greedy)



returns 703 matching results (reluctant).

Thanks for pointing me in the right direction!

[edited to fix code tags]
[ August 13, 2007: Message edited by: Katrina Owen ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!