Find pattern and insert content