Border alignment

Can anyone tell me how to align borders left and right and text in middle?

Have a look at this,

thank you Sujith, but i already tried this it gives me vertical line and i want horizontal.

You can use ::before and ::after the text, if you could provide a codepen or jsfiddle to your project it would be easy

You can refer this,

thank you Sujith it helped me. Thank you man