추출한 데이터에서 원하는 데이터만 가져오고 싶을때 정규식을 이용해서 가져오면 간단하게 해결된다.



using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Text.RegularExpressions;


namespace ConsoleApplication1

{

    class Program

    {

        // 정규식

        const string _RegTxt = "<strong>(?<entry>.*?)</strong>";        


        static void Main(string[] args)

        {   

            //추출한 문자

            String txt = "<html><body><strong>문자</strong></body></html>";

                        

            Console.WriteLine("result : {0}", getRegText(txt, _RegTxt));                     

        }

        

        /// <summary>

        /// 문자 추출하기

        /// </summary>

        /// <param name="txt">추출한 문자</param>

        /// <param name="txtRegx">정규식</param>

        /// <returns></returns>

        public static string getRegText(string txt, string txtRegx)

        {

            Group g = null;

            string result=null; 


            Regex reg = new Regex(txtRegx, RegexOptions.IgnoreCase | RegexOptions.Singleline);

            MatchCollection resultColl = reg.Matches(txt);



            foreach (Match mm in resultColl)

            {

                g = mm.Groups[1];

                result =  mm.Groups["entry"].ToString();

            }


            return result;

        }

    }

}



Posted by 아로스

unixtime을 Data()형식으로 변경하기


select from_unixtime(unix_timestamp(),'%Y%m%d')

Posted by 아로스

1. 윈도우 실행창에 netplwiz 입력하고 엔터

2. 사용자 계정 팝업 창에서 [사용자 이름과 암호를 입력해야 이 컴퓨터를 사용할 수 있음] 체크 해제 후 적용

3. 비밀번호 입력 하면 끝.

Posted by 아로스

 

같은 경로인데 파일 리스트가 다르게 보이네요.

왜 그런걸까요?

 

익스플로러상단 메뉴 도구 > 인터넷옵션 > 설정 > 파일보기 에서 확인되는 파일 리스트 

 

탐색기로 해당 폴더 접근했을 때 파일 리스트

 

Posted by 아로스

var jScript = document.createElement("script"); 

jScript.src = "경로/파일명.js"; 

document.head.appendChild(jScript); 

Posted by 아로스

아로스

달력