Valmiki Ramayana Yuddha Kanda Sarga 81 Shloka 28
Original Shlokaन हन्तव्याःस्त्रियश्चेतियद् ब्रवीषिप्लवङ्गम ।।6.81.28।। पीडाकरममित्राणांयत्स्यात्कर्तव्यमेवतत् ।
1 source checked for this shloka
प्लवङ्गम monkey, स्त्रियः woman, न हन्तव्याःइति not to be killed, यत् by that, यत् who ever, अमित्राणाम् enemy, पीडाकरम् causes trouble, स्यात् to be done, तत् that, कर्तव्यमेव that action alone
"O Hanuman! You said women should not be killed. But whoever causes trouble to the enemy, action should be taken, said Indrajith."