Take the 2-minute tour ×
Japanese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language. It's 100% free, no registration required.

I need to match all of these sentences:


But for these, I want to match the outer sentence, not just the ones inside 「」:


I came up with this and wanted to make sure I've got it right. I am capturing everything outside [「」].


I believe it says:

  • Find non 「」。!? zero or more times, then
  • Find a 「. If there is one, match zero or more non 「」 until the next 」
  • Then repeat matching non 「」。!? zero or more times
  • The above two is repeated zero or more times
  • Finally, find a 。!? delimiter.

Do I have that right? And more importantly, what do you think? =)

EDIT: since my request is unclear, I'd put it in a simpler way. Turn this:


into this:

  1. お天気雨が降りました。
  2. いわゆる狐の嫁入りですね。
  3. そのキツネさんに「俺の嫁になってくれ!」せがみたいところですが、変人と思われる可能性を考えたら、やめやめ。
  4. そういえば昔「お天気雨に浴びると大変なことになっちゃうよ」と母さん言ったことがあるが、「大変なことってなんのこと?ゆうぅぅぅって!」と少女チックに聞き返した。
  5. まさかキツネさんに神隠しされるとかそんなわけないよね。
share|improve this question

closed as off topic by Ignacio Vazquez-Abrams, deceze, yibe, rob, repecmps Jun 2 '11 at 3:20

Questions on Japanese Language Stack Exchange are expected to relate to the Japanese language within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

I think this question is quite offtopic. :) –  deceze Jun 2 '11 at 2:33
ask in stackoverflow or something like that :p –  Vicfred Jun 2 '11 at 2:34
Ask on stackoverflow? –  istrasci Jun 2 '11 at 2:34
Can you explain what is your expected result, the rules you have is rather confusing. –  Ken Li Jun 2 '11 at 2:44
@syo, If you don't want to match "ひるむな。" as the sentence in 先生... sentence, You might need to use real morphological analyzer like mecab –  YOU Jun 2 '11 at 2:54

Browse other questions tagged or ask your own question.