How to use span multi term query in elastic search

My requirement is if the user enters multiple regex string separated by pipe, i should perform search in elastic search. from documents, i think span multi term query would be the best option and i want some one to help me in constructing the exact query. please help.