问题描述:

I require a URL expression to match exact 'n' number of characters before decimal point. Can anyone help me please.

网友答案:

The example below matches 2

\d{2}\.

To only match the digits put them in a a capturing group

(\d{2})\.

Or use lookaround

\d{2}(?=\.)
相关阅读:
Top