Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • You don't really need a regex here, but you should escape the start-of-string sign: <\^>. Commented Apr 12, 2010 at 12:10
  • @Kobi: Thanks. I didn't actually expect that and thought I only need to escape ^ in character groups. Tried it and you're obviously correct. Fixed the post. Commented Apr 12, 2010 at 12:16
  • Quite the opposite - character groups is the one place you normally don't have to escape characters. Commented Apr 12, 2010 at 12:18
  • @Kobi: But ^ is starting a negative character group - so I thought of that usage and somehow assumed that it won't act as anchor in the middle of the text. My bad. Thanks again. Commented Apr 12, 2010 at 12:39