»Ë»Ñ Æ÷·³
°³¹ßÀÚÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

[java] String ¿¡¼­.. °ýÈ£ () ¾ÈÀÇ ¹®ÀÚ ÆĽÌÇϱâ14

String str =
                filename
                filename (1)
                filename (2)
                     ...
                filename (43)



¸¸¾à ½ºÆ®¸µ º¯¼ö Çϳª¿¡ À§¿Í °°Àº °ªÀÌ Çϳª¾¿ µé¾î°¡ÀÖÀ» ¶§

µÎ ¹ø° ½ºÆ®¸µ º¯¼ö¿¡¼­´Â 1À»...
¼¼ ¹ø° º¯¼ö¿¡¼­´Â 2¸¦...
¸¶Áö¸· º¯¼ö¿¡¼­´Â 43À» »Ì¾Æ¿À°í ½Í½À´Ï´Ù.

Áï ½ºÆ®¸µ ¸Ç ³¡ÀÇ ( ) »çÀÌÀÇ °ªÀ» »©¿À°í ½ÍÀº °ÍÀÔ´Ï´Ù.

óÀ½¿£ ´Ü¼øÈ÷ splitÀ¸·Î ( ·Î ÀÚ¸£°í, ) ·Î ÀÚ¸£°í Çؼ­ °¡Á®¿Ô´Âµ¥
¸¸¾à¿¡   " file(name (1) " ÀÌ·±½ÄÀ¸·Î µÇ¾îÀÖÀ¸¸é  ( ·Î ÆĽÌÇϴµ¥ ¹®Á¦°¡ ÀÖ´Â °Í °°¾Æ¼­...

() °ýÈ£ ¾ÈÀÇ °ªÀ» •û¿À´Â...
¾î¶² ÁÁÀº ¹æ¹ýÀÌ ÀÖÀ»±î¿ä??

-----------------------------------------------------------------------------------------------
ã¾Æº¸´Ï
Pattern pattern = Pattern.compile( ¿ä±â );
Matcher matcher = pattern.matcher(text);

ÀÌ·± ÆÐÅÏ (Á¤±Ô½Ä)À¸·Î ã´Â ¹æ¹ýÀÌ ÀÖ´øµ¥
Àú±â compile ¸Þ¼Òµå ¾ÈÀÇ ÆĶó¹ÌÅÍ (¿ä±â) ·Î´Â ¾î¶² ½ÄÀ¸·Î ³Ö¾îÁà¾ß () ¾ÈÀÇ °ªÀ» »©¿Ã ¼ö ÀÖ³ª¿ä??


´Ù¸¥ ¹æ¹ýµµ ÀÖÀ¸¸é ´ñ±Û ºÎŹµå¸³´Ï´Ù

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 Koonta

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ±ò»ïÇÑ°Å

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ARMADA700

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ±ò»ïÇÑ°Å

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ARMADA700

´Ù¸¥ÀÇ°ß 0 Ãßõ 1 custard

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ±ò»ïÇÑ°Å

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 À̶óÀ̳Ê

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ³ë·ÂÇü°õ

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ±ò»ïÇÑ°Å

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ³ë·ÂÇü°õ

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 »×Ä¡±â»×Â÷
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û ¸ñ·Ïº¸±â